Skip to content

Commit 4b171b8

Browse files
committed
Fjerner egen action for Salesforce Code Analyser
Blir overflødig da det allerede eksisterer en action for det. Flyttet versjon av scanneren ut til repo variabler
1 parent 360d905 commit 4b171b8

File tree

2 files changed

+23
-63
lines changed

2 files changed

+23
-63
lines changed

.github/actions/runSalesforceCodeAnalyzer/action.yml

Lines changed: 0 additions & 60 deletions
This file was deleted.

.github/workflows/ciStaticCodeValidation.yml

Lines changed: 23 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,15 @@ jobs:
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:
@@ -71,7 +80,18 @@ jobs:
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

0 commit comments

Comments
 (0)