Skip to content

Commit 655e1dc

Browse files
committed
chore: Gi bedre tilbakemelding når Code Analyser reapporterer for mange feil.
1 parent a6b5140 commit 655e1dc

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

.github/workflows/ciStaticCodeValidation.yml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,4 +100,10 @@ jobs:
100100
- name: Check the Salesforce Code Analyzer outputs to determine whether to fail
101101
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 ) }}
102102
shell: bash
103-
run: exit 1
103+
run: |
104+
echo "::error title=Code Analyzer failed with exit code: ${EXIT_CODE}::Number of Sev1 violations: ${NUM_SEV1_VIOLATIONS} (max 0). Number of violations: ${NUM_VIOLATIONS} (max 10)."
105+
exit 1
106+
env:
107+
EXIT_CODE: ${{ steps.run-code-analyzer.outputs.exit-code }}
108+
NUM_SEV1_VIOLATIONS: ${{ steps.run-code-analyzer.outputs.num-sev1-violations }}
109+
NUM_VIOLATIONS: ${{ steps.run-code-analyzer.outputs.num-violations }}

0 commit comments

Comments
 (0)