mirror of
https://github.com/Jaganpro/sf-skills.git
synced 2026-09-19 07:52:00 +08:00
8ace846293
2 3 Adds OOTB linting via sf code-analyzer CLI to augment custom 150-point 4 scoring. Hooks auto-trigger on Write/Edit of Apex and Flow files. 5 6 NEW INFRASTRUCTURE (shared/code_analyzer/): 7 - scanner.py: Core wrapper for `sf code-analyzer run` CLI 8 - dependency_checker.py: Multi-path Java detection (Homebrew support) 9 - score_merger.py: Combines custom scoring with CA violations 10 - parser.py: JSON result normalization 11 - formatter.py: Terminal output formatting 12 - config/code-analyzer.yml: Engine configuration 13 14 HOOK INTEGRATION: 15 - sf-apex/hooks: Added Edit matcher, post-tool-validate.py 16 - sf-flow/hooks: Added Edit matcher, post-tool-validate.py 17 - Timeout increased to 120s for CA scans 18 19 KEY FEATURES: 20 - 7 engines: PMD, CPD, SFGE, ESLint, RetireJS, Flow Scanner, Regex 21 - Graceful degradation when deps missing (Java, Node, Python) 22 - Auto-detects Java in Homebrew paths (/opt/homebrew/opt/openjdk@*) 23 - Propagates JAVA_HOME to sf CLI subprocess 24 - Filters engine errors from violation output 25 26 FIXES INCLUDED: 27 - Java detection: Handles Salesforce wrapper scripts 28 - SFGE errors: No longer shown as CRITICAL violations 29 - Class name parsing: Excludes "class" keyword in comments 30 - Flow Python: Explicit python_command in config 31 32 VALIDATION OUTPUT FORMAT: 33 🔍 Apex Validation: AccountService.cls 34 📊 Score: 138/150 ⭐⭐⭐⭐ Very Good 35 🔬 Code Analyzer: pmd, regex (3482ms) 36 ❗ Issues: [sf-skills] + [CA:pmd] combined 37 38 STATS: 14 files changed, ~3500 insertions