Skip to content

forcedotcom/sf-skills / plugins/builder/salesforce-code-quality/skills/dx-code-analyzer-run

dx-code-analyzer-run

Verified

Run Salesforce Code Analyzer to scan code for security, performance, best practice, and code style violations. Supports all engines (PMD, ESLint, CPD, RetireJS, Flow, SFGE, ApexGuru), targets (files, folders, git diff), categories, and severities. Also handles post-scan exploration: filtering results by engine/severity/category/file, and explaining what rules mean. TRIGGER when: user says 'scan my code', 'check security issues', 'run PMD/ESLint', 'find duplicates', 'analyze Flows', 'check vulnerable libraries', 'AppExchange review', 'lint my LWC', 'static analysis', 'code quality', 'show security violations', 'what is this rule', 'explain ApexCRUDViolation', 'filter results', or mentions engines/file types (.cls, .trigger, .js, .flow-meta.xml). Use this skill for scanning, exploring results, and listing rules. DO NOT TRIGGER when: user asks only about installation/configuration (use dx-code-analyzer-configure), or wants to create a custom rule (use dx-code-analyzer-custom-rule-create).

references/engine-reference.md

View on GitHub
# Engine Reference

## Engine File Type Support

| Engine | File Extensions |
|---|---|
| **pmd** | `.cls`, `.trigger`, `.js`, `.html`, `.htm`, `.vfp`, `.component`, `.page`, `.xml` |
| **eslint** | `.js`, `.ts`, `.jsx`, `.tsx` |
| **cpd** | `.cls`, `.trigger`, `.js`, `.ts`, `.html`, `.htm`, `.vfp`, `.component`, `.page`, `.xml` |
| **retire-js** | `.js`, `.ts`, `package.json`, `package-lock.json` |
| **regex** | Configurable per rule via `file_extensions` |
| **flow** | `.flow-meta.xml` |
| **sfge** | `.cls`, `.trigger` |
| **apexguru** | `.cls`, `.trigger` |

## Common Rule Tags

These tags can be used in rule selectors:

| Tag | Meaning |
|---|---|
| `Recommended` | Default ruleset — curated for most projects |
| `Security` | Security vulnerabilities (CRUD, XSS, injection, crypto) |
| `Performance` | Performance anti-patterns (SOQL in loops, limits) |
| `BestPractices` | Coding standards and conventions |
| `CodeStyle` | Naming, formatting, braces |
| `Design` | Complexity, coupling, architecture |
| `ErrorProne` | Common bug patterns |
| `Documentation` | Missing docs, comments |
| `Apex` | Rules applying to Apex language |
| `JavaScript` | Rules applying to JavaScript |
| `TypeScript` | Rules applying to TypeScript |
| `HTML` | Rules applying to HTML/Visualforce |
| `Custom` | User-defined rules |
rea-analysis-optimizationmorluto/reaOptimize REA providers and shared analysis workflows for agent context, latency, CPU, and memory while preserving correctness and Evidence. Use for analysis bottlenecks and cache or query design; CI/test-suite optimization belongs to rea-ci-tests-audit.Stars: 469kUpdated Claude CodeCodexVerifiedInstall
rea-ci-tests-auditmorluto/reaAudit REA CI and test suites for correctness, fixture drift, false passes, and measured performance; use for suite or workflow investigations and efficiency changes, rather than ordinary feature testing or a single test failure.Stars: 469kUpdated Claude CodeCodexVerifiedInstall
rea-tool-designmorluto/reaAudit, investigate, design, or change REA investigation tools, CLI/MCP contracts, provider capabilities, and Evidence semantics.Stars: 469kUpdated Claude CodeCodexVerifiedInstall
ponytail-auditDietrichGebert/ponytailQuality audit of the whole repo: bugs, security, real load, missing tests, speed, and what to delete. Most important first.Stars: 194kUpdated Claude CodeCodexVerifiedInstall