Skip to content

NEW @W-22465772@ Implement ApexGuru as Dev Preview (Don't Run by Default)#482

Open
nikhil-mittal-165 wants to merge 1 commit into
devfrom
feature/apexguru-dev-preview
Open

NEW @W-22465772@ Implement ApexGuru as Dev Preview (Don't Run by Default)#482
nikhil-mittal-165 wants to merge 1 commit into
devfrom
feature/apexguru-dev-preview

Conversation

@nikhil-mittal-165

Copy link
Copy Markdown
Contributor

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

  • Mark all 23 ApexGuru rules with DevPreview tag so the engine does not run by default
  • Updated rule configuration to exclude ApexGuru from default Recommended ruleset
  • ApexGuru rules are selectable via explicit --rule-selector (engine name, rule name, or DevPreview tag)

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

…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

git2gus Bot commented Jul 14, 2026

Copy link
Copy Markdown

Git2Gus App is installed but the .git2gus/config.json doesn't have right values. You should add the required configuration.

@nikhil-mittal-165 nikhil-mittal-165 marked this pull request as ready for review July 14, 2026 07:38
@nikhil-mittal-165 nikhil-mittal-165 changed the title New @W-22465772@ Implement ApexGuru as Dev Preview (Don't Run by Default) NEW @W-22465772@ Implement ApexGuru as Dev Preview (Don't Run by Default) Jul 14, 2026

@aruntyagiTutu aruntyagiTutu left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants