Apex & LWC Code Complexity Analyzer
Analyzes Apex methods and LWC functions to identify and flag high-complexity code hotspots that require refactoring.
The Complexity skill is a specialized static analysis tool for Salesforce DX projects that measures cyclomatic and cognitive complexity. By leveraging PMD for Apex and a custom heuristic counter for Lightning Web Components (LWC), it identifies 'hotspots'—methods and functions with too many independent paths that are prone to bugs and difficult to test. It provides clear, actionable reports with distribution metrics and specific refactoring suggestions, helping architects and developers maintain a clean, modular codebase within the Argo security-first workflow.
Características Principales
01Automated cyclomatic complexity calculation for Apex and LWC JavaScript.
02Configurable complexity thresholds (defaulting to 10) to match team standards.
030 GitHub stars
04Integrated PMD analysis for industrial-grade Apex design rule checking.
05Custom heuristic logic for LWC functions including branch and loop detection.
06Detailed Markdown or SARIF reporting for both local development and CI/CD pipelines.
Casos de Uso
01Identifying high-risk methods in legacy Apex classes before starting a refactoring phase.
02Enforcing code quality standards during architectural reviews to prevent 'spaghetti' code.
03Automating complexity gates in CI/CD pipelines to block unmaintainable code from reaching production.