Skip to content

Commit

Permalink
Merge branch 'develop' into fabioschiozer-patch-1
Browse files Browse the repository at this point in the history
  • Loading branch information
fschiozerSFDC authored May 22, 2024
2 parents c9b3050 + f2b30f7 commit 2e583cc
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 13 deletions.
16 changes: 4 additions & 12 deletions .github/workflows/codeAnalyzerOnPR.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Salesforce Code Analyzer on PR
name: Salesforce Code Analyzer - on pull request

on:
pull_request:
Expand All @@ -22,26 +22,18 @@ jobs:
- name: Get changed files
id: changed-files
uses: tj-actions/changed-files@v44

- name: List all changed files
env:
ALL_CHANGED_FILES: ${{ steps.changed-files.outputs.all_changed_files }}
run: |
for file in ${ALL_CHANGED_FILES}; do
echo "$file was changed"
done

- name: Run Salesforce Code Analyzer
id: run-code-analyzer
uses: forcedotcom/run-code-analyzer@v1
with:
run-command: run
run-arguments: --normalize-severity --target ${ALL_CHANGED_FILES} --outfile results.html
run-arguments: --normalize-severity --target ${{ steps.changed-files.outputs.all_changed_files }} --outfile results.html
results-artifact-name: salesforce-code-analyzer-results

- name: Check the outputs to determine whether to fail
if: |
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
steps.run-code-analyzer.outputs.num-violations > 0
run: exit 1
1 change: 1 addition & 0 deletions force-app/main/default/classes/DummyClass.cls
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ public with sharing class DummyClass {
}

public static String getStatic(){

String a = 'Analiza o código';

return a;
Expand Down
2 changes: 1 addition & 1 deletion manifest/buildfile.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"type": "metadata",
"manifestFile": "manifest/package.xml",
"testLevel": "RunSpecifiedTests",
"classPath": "force-app/main/default",
"classPath": "force-app/main/default/classes",
"timeout": "33",
"ignoreWarnings": true
},
Expand Down

0 comments on commit 2e583cc

Please sign in to comment.