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.

Usage

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

Options

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

Example

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

Feedback or Bugs | Edit this Article