File tree Expand file tree Collapse file tree 1 file changed +5
-5
lines changed
Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -67,33 +67,33 @@ jobs:
6767 eslintPathsToValidate="${eslint_diffed_files_to_lint[@]}"
6868 sfCodeAnalyzerPathToValidate=$codeAnalyzer_json
6969 fi
70-
70+
7171 echo "prettierPathsToValidate=$prettierPathsToValidate" >> $GITHUB_OUTPUT
7272 echo "eslintPathsToValidate=$eslintPathsToValidate" >> $GITHUB_OUTPUT
7373 echo "sfCodeAnalyzerPathToValidate=$sfCodeAnalyzerPathToValidate" >> $GITHUB_OUTPUT
7474
7575 - name : Prettier Check
76+ if : ${{ !cancelled() && steps.paths.outcome == 'success' }}
7677 uses : navikt/sf-platform/.github/actions/prettierCheck@main
7778 with :
7879 pathToValidate : ${{ steps.paths.outputs.prettierPathsToValidate }}
7980
8081 - name : Eslint check
82+ if : ${{ !cancelled() && steps.paths.outcome == 'success' }}
8183 uses : navikt/sf-platform/.github/actions/eslintCheck@main
8284 with :
8385 pathToValidate : ${{ steps.paths.outputs.eslintPathsToValidate }}
8486
8587 - name : Run Salesforce Code Analyzer
8688 id : run-code-analyzer
89+ if : ${{ !cancelled() && steps.paths.outcome == 'success' }}
8790 uses : forcedotcom/run-code-analyzer@v1
8891 with :
8992 run-command : run
9093 run-arguments : --normalize-severity --outfile results.html --target ${{ steps.paths.outputs.sfCodeAnalyzerPathToValidate }}
9194 results-artifact-name : salesforce-code-analyzer-results
9295
9396 - name : Check the Salesforce Code Analyzer outputs to determine whether to fail
97+ if : ${{ !cancelled() && steps.paths.outcome == 'success' && ( steps.run-code-analyzer.outputs.exit-code > 0 || steps.run-code-analyzer.outputs.num-sev1-violations > 0 || steps.run-code-analyzer.outputs.num-violations > 10 ) }}
9498 shell : bash
95- if : |
96- steps.run-code-analyzer.outputs.exit-code > 0 ||
97- steps.run-code-analyzer.outputs.num-sev1-violations > 0 ||
98- steps.run-code-analyzer.outputs.num-violations > 10
9999 run : exit 1
You can’t perform that action at this time.
0 commit comments