Skip to content

Commit eb02200

Browse files
committed
Justering i jobben.
1 parent 4b171b8 commit eb02200

File tree

1 file changed

+11
-9
lines changed

1 file changed

+11
-9
lines changed

.github/workflows/ciStaticCodeValidation.yml

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,10 @@ jobs:
3535

3636
- name: "Install Salesforce Code Analyzer"
3737
run: |
38+
echo "::group::Install Salesforce Code Analyzer Plugin"
3839
sf plugins install code-analyzer@${{ vars.SF_SCANNER_VERSION }}
40+
sf plugins --core
41+
echo "::endgroup::"
3942
4043
- name: "Checkout"
4144
uses: actions/checkout@v4
@@ -50,11 +53,11 @@ jobs:
5053
- name: "Set variables"
5154
id: paths
5255
run: |
53-
if [ ${{ inputs.validateEntireRepo }} ]; then
54-
prettierPathsToValidate='.'
55-
eslintPathsToValidate='.'
56-
sfCodeAnalyzerPathToValidate='src'
57-
else
56+
prettierPathsToValidate='\"**/*.{cls,cmp,component,css,html,js,json,md,page,trigger,xml,yaml,yml}\"'
57+
eslintPathsToValidate='**/{aura,lwc}/**/*.js'
58+
sfCodeAnalyzerPathToValidate='src'
59+
60+
if [ ! ${{ inputs.validateEntireRepo }} ]; then
5861
mapfile -t prettier_diffed_files_to_lint < <(git diff --name-only --diff-filter=d HEAD~ -- \*.{cls,cmp,component,css,html,js,json,md,page,trigger,xml,yaml,yml})
5962
mapfile -t eslint_diffed_files_to_lint < <(git diff --name-only --diff-filter=d HEAD~ -- \*.js})
6063
mapfile -t codeAnalyzer_diffed_sf_files < <(git diff --name-only --diff-filter=d HEAD~ -- src\**\*.{cls,cmp,component,css,html,js,json,page,trigger,xml})
@@ -63,12 +66,11 @@ jobs:
6366
prettierPathsToValidate ="${prettier_diffed_files_to_lint[@]}"
6467
eslintPathsToValidate="${eslint_diffed_files_to_lint[@]}"
6568
sfCodeAnalyzerPathToValidate=$codeAnalyzer_json
66-
6769
fi
6870
69-
echo "prettierPathsToValidate=$prettierPathsToValidate" >> $GITHUB_OUTPUT
70-
echo "eslintPathsToValidate=$eslintPathsToValidate" >> $GITHUB_OUTPUT
71-
echo "sfCodeAnalyzerPathToValidate=$sfCodeAnalyzerPathToValidate" >> $GITHUB_OUTPUT
71+
echo "prettierPathsToValidate=$prettierPathsToValidate" >> $GITHUB_OUTPUT
72+
echo "eslintPathsToValidate=$eslintPathsToValidate" >> $GITHUB_OUTPUT
73+
echo "sfCodeAnalyzerPathToValidate=$sfCodeAnalyzerPathToValidate" >> $GITHUB_OUTPUT
7274
7375
- name: Prettier Check
7476
uses: navikt/sf-platform/.github/actions/prettierCheck@main

0 commit comments

Comments
 (0)