Zum Inhalt springen
Kitbay
Einreichen

dx-code-analyzer-custom-rule-create

Apache-2.0Aktualisiert am 6. Nov. 20261.156GitHub-SterneEnthält Skripte

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

Was der Skill vermittelt

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.

Funktionen

  • 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