File tree Expand file tree Collapse file tree 2 files changed +23
-63
lines changed
actions/runSalesforceCodeAnalyzer Expand file tree Collapse file tree 2 files changed +23
-63
lines changed Load Diff This file was deleted.
Original file line number Diff line number Diff line change 2828 run :
2929 shell : " bash"
3030 steps :
31+ - name : " Install SF CLI"
32+ uses : navikt/sf-platform/.github/actions/installSfCli@main
33+ with :
34+ version : ${{ vars.SF_CLI_VERSION }}
35+
36+ - name : " Install Salesforce Code Analyzer"
37+ run : |
38+ sf plugins install code-analyzer@${{ vars.SF_SCANNER_VERSION }}
39+
3140 - name : " Checkout"
3241 uses : actions/checkout@v4
3342 with :
7180 with :
7281 pathToValidate : ${{ steps.paths.outputs.eslintPathsToValidate }}
7382
74- - name : Salesforce Code Analyzer
75- uses : navikt/sf-platform/.github/actions/runSalesforceCodeAnalyzer@main
83+ - name : Run Salesforce Code Analyzer
84+ id : run-code-analyzer
85+ uses : forcedotcom/run-code-analyzer@v1
7686 with :
77- pathToValidate : ${{ steps.paths.outputs.sfCodeAnalyzerPathToValidate }}
87+ run-command : run
88+ run-arguments : --normalize-severity --outfile results.html --target ${{ steps.paths.outputs.sfCodeAnalyzerPathToValidate }}
89+ results-artifact-name : salesforce-code-analyzer-results
90+
91+ - name : Check the Salesforce Code Analyzer outputs to determine whether to fail
92+ shell : bash
93+ if : |
94+ steps.run-code-analyzer.outputs.exit-code > 0 ||
95+ steps.run-code-analyzer.outputs.num-sev1-violations > 0 ||
96+ steps.run-code-analyzer.outputs.num-violations > 10
97+ run : exit 1
You can’t perform that action at this time.
0 commit comments