NEW @W-22465772@ Implement ApexGuru as Dev Preview (Don't Run by Default)#482
NEW @W-22465772@ Implement ApexGuru as Dev Preview (Don't Run by Default)#482nikhil-mittal-165 wants to merge 1 commit into
Conversation
…y default Add DEV_PREVIEW_TAG constant and apply it as the first tag on all 23 ApexGuru rules. For the 7 rules that previously had RECOMMENDED, the Recommended tag is removed entirely. This follows the same pattern used by SFGE, ensuring the default rule selector (which targets Recommended) never auto-selects ApexGuru rules while explicit selectors still work.
|
Git2Gus App is installed but the |
aruntyagiTutu
left a comment
There was a problem hiding this comment.
APPROVED — clean, well-tested change to gate ApexGuru rules behind DevPreview.
Review Against Guidelines ✅
6. Testing ✅ — Excellent coverage: it.each() parameterized tests for both the 7 rules that previously had RECOMMENDED and the 16 that didn't, plus aggregate invariant tests (23 rules total, all have DevPreview, none have Recommended, all retain a category + language tag). Every assertion is meaningful, no bare setup blocks.
8. PR Hygiene ✅ — Single, well-scoped concern (retag rules, exclude from default scan). Commit title follows NEW @W-XXXXX@ convention. Test evidence in the description is detailed and verifiable.
2. Naming ✅ — DEV_PREVIEW_TAG constant avoids repeating the literal string across the rule table.
Nit (non-blocking): code-analyzer-sfge-engine/src/engine.ts already declares an identical local DEV_PREVIEW_TAG = 'DevPreview' constant. Since this is now the second engine defining the same tag independently, it may be worth hoisting DEV_PREVIEW into COMMON_TAGS in code-analyzer-engine-api (alongside RECOMMENDED/CUSTOM) as a follow-up, per the guide's "separate concerns into reusable files" principle — not a blocker for this PR.
Summary
Implement ApexGuru as a development preview feature that runs only when explicitly selected via rule selector, excluding it from default scans.
GUS Ticket W-22465772 — Implement ApexGuru as Dev Preview (Don't Run by Default)
Changes
Dependencies
None
Test Evidence
Unit tests: apexguru-engine 145/145 pass
Integration: (1) --rule-selector Recommended shows 0 apexguru rules (default scan excludes ApexGuru); (2) --rule-selector apexguru shows 23 rules all with DevPreview tag, no Recommended tag; (3) --rule-selector DevPreview shows 23 apexguru rules; (4) --rule-selector SoqlInALoop selects individual rule correctly; (5) sf code-analyzer run --rule-selector apexguru completes with 3 violations found, no crash.
Fix attempts: 0
Integration: PASS - all 6 acceptance criteria verified: 23 rules have DevPreview, 0 have Recommended, default scan excludes ApexGuru, explicit selectors (engine name, tag, rule name) all work correctly
Known external failures (not blocking): PMD/CPD/SFGE engines fail - no Java v11+ installed (environment limitation)
Test Status: PASS