Salesforce Code Analyzer Command Reference

Salesforce Code Analyzer Command Reference

sf scanner rule describe

Provides detailed information about a rule. Information includes the rule’s language (such as Apex or Java), the violation it detects, and example code of the violation. The command output also includes the rule’s categories and rulesets.


$ sf scanner rule describe -n <string> [--verbose] [--json]


  -n, --rulename=rulename	(required) The name of the rule.
  --json			Formats output as JSON.
  --verbose 			Emits additional command output to stdout.


  $ sf scanner rule describe --rulename ExampleRule
     name:        ExampleRule
     categories:  ExampleCategory
     rulesets:    Ruleset1
     languages:   apex
     description: Short description of rule
     message:     ExampleRule Violated.

Feedback or Bugs | Edit this Article