Skip to content
Kitbay
Submit

dx-code-analyzer-custom-rule-create

Apache-2.0Updated on Nov 6, 20261,156GitHub starsIncludes scripts

A Salesforce skill for writing custom rules for Salesforce Code Analyzer.

What the skill teaches

A Salesforce skill for writing custom rules for Salesforce Code Analyzer. It covers three kinds: regular expression rules for text patterns, PMD rules written in XPath for Apex and metadata XML, and ESLint rules for Lightning Web Components, JavaScript and TypeScript. The agent picks the engine, can start from code the user has selected, writes the rule and its configuration from bundled templates and scripts, checks that Code Analyzer recognises it, and tests it. Typical uses are banning System.debug, catching hard-coded IDs or enforcing naming and API version policies. Running scans and general configuration are other skills.

Capabilities

  • Create regex rules for Code Analyzer
  • Write PMD XPath rules for Apex or metadata
  • Add ESLint rules for LWC and JavaScript
  • Test that a custom rule is picked up