forcedotcom/Run Salesforce Code Analyzer

Scans your code for violations using Salesforce Code Analyzer, uploads results as an artifact, and creates a job summary.

View on GitHub

Trust Signals

Scorecard Score
not yet scored
Maintenance Recency
Stale
License
None
namedescriptionrequireddefault
run-argumentsSpecifies the flags passed to the `code-analyzer run` command. Default: "--view detail --output-file sfca_results.json" For a full list of valid flags for the `code-analyzer run` command, see the [code-analyzer Command Reference](https://developer.salesforce.com/docs/atlas.en-us.sfdx_cli_reference.meta/sfdx_cli_reference/cli_reference_code-analyzer_commands_unified.htm). The stdout text from the `code-analyzer run` command is written to the GitHub workflow run logs. Each output file specified by a `--output-file` (or `-f`) flag is included in the ZIP archive [GitHub workflow run artifact](https://docs.github.com/en/actions/managing-workflow-runs-and-deployments/managing-workflow-runs/downloading-workflow-artifacts) for you to download.no--view detail --output-file sfca_results.json
results-artifact-nameSpecifies the name of the ZIP archive [GitHub workflow run artifact](https://docs.github.com/en/actions/managing-workflow-runs-and-deployments/managing-workflow-runs/downloading-workflow-artifacts) where the results output files are uploaded. Default: "salesforce-code-analyzer-results"nosalesforce-code-analyzer-results
github-tokenWhen this action is run against a pull request, you can provide a Github token, which is used to create a review of the pull request. The review specifies how many violations were found (both in the project as a whole and in changed files) and links to the action summary page. This token must have write permissions for pull requests.no
namedescription
exit-codeThe Salesforce Code Analyzer execution exit code.
num-violationsThe total number of violations found across all files.
num-sev1-violationsThe number of Critical (1) severity violations found across all files.
num-sev2-violationsThe number of High (2) severity violations found across all files.
num-sev3-violationsThe number of Medium (3) severity violations found across all files.
num-sev4-violationsThe number of Low (4) severity violations found across all files.
num-sev5-violationsThe number of Info (5) severity violations found across all files.
num-violations-in-changed-filesThe total number of violations found in files changed by the pull request. Only available when running on a pull request with a github-token provided.
num-sev1-violations-in-changed-filesThe number of Critical (1) severity violations found in files changed by the pull request. Only available when running on a pull request with a github-token provided.
num-sev2-violations-in-changed-filesThe number of High (2) severity violations found in files changed by the pull request. Only available when running on a pull request with a github-token provided.
num-sev3-violations-in-changed-filesThe number of Medium (3) severity violations found in files changed by the pull request. Only available when running on a pull request with a github-token provided.
num-sev4-violations-in-changed-filesThe number of Low (4) severity violations found in files changed by the pull request. Only available when running on a pull request with a github-token provided.
num-sev5-violations-in-changed-filesThe number of Info (5) severity violations found in files changed by the pull request. Only available when running on a pull request with a github-token provided.
review-idIf this action created a pull request review, this is its ID.