Anti-patterns report
The output of vulkro-sf antipatterns: Well-Architected anti-pattern findings (governor limits, trigger design, maintainability), grouped by pillar. It is an architecture report, not a security report.
vulkro-sf antipatterns ./force-app # table
vulkro-sf antipatterns ./force-app --format json > antipatterns.json
Formats: table (default), json, sarif and junit. Every finding has an AP- id, title, file, line, the detail and a remediation.
Table
Vulkro for Salesforce - Well-Architected anti-patterns: .
Pillar: Trusted (Reliable)
[AP-001] SOQL query inside a loop (./force-app/main/default/classes/LeadBatch.cls:4) (Resource Optimiser)
A SOQL query executes inside a loop at line 4: `List<Lead> ls = [SELECT Id, Name FROM Lead WHERE Status = :s];`. ...
Remediation: Move the SOQL query outside the loop. ...
[AP-004] Empty catch block (./force-app/main/default/classes/LeadBatch.cls:5)
A catch block at line 5 has an empty body. ...
Remediation: At minimum, log the exception ...
7 anti-pattern finding(s).
(Resource Optimiser) marks the governor-limit rules. It is a display label only.
JSON
{
"schema_version": "1",
"scanner": {"name": "vulkro-sf", "version": "0.27.2", "build_id": "e8492a2b70f1edeb"},
"findings": [
{
"id": "AP-001",
"title": "SOQL query inside a loop",
"pillar": "Trusted (Reliable)",
"severity": "medium",
"risk_category": "code-quality",
"file": "./force-app/main/default/classes/LeadBatch.cls",
"line": 4,
"detail": "A SOQL query executes inside a loop at line 4: ...",
"remediation": "Move the SOQL query outside the loop. ..."
}
]
}
Exit codes
0 no findings, 1 findings reported (or no licence), 2 error. The format never changes the exit code.
See also: Well-Architected anti-patterns, CLI reference, JUnit output