Scan Apex for Anti-Patterns
sf_scan_apex_antipatternsScan Apex classes to identify anti-patterns, including SOQL/DML in loops, hardcoded IDs, and debug statements, before deployment to prevent performance and quality issues.
Instructions
Scans Apex classes in the org for common anti-patterns using the Tooling API. Detects SOQL/DML in loops, hardcoded Salesforce IDs, and debug statements left in production code. Use before deploying to catch performance and quality issues early.
classNames: optional list of class names to scan (omits test classes with __Test suffix) maxClasses: maximum classes to scan (default 20, max 200)
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| classNames | No | Apex class names to scan (omit to scan all) | |
| maxClasses | No | Maximum number of classes to scan |