Skip to content

Update DummyClass.cls #4

Update DummyClass.cls

Update DummyClass.cls #4

name: Salesforce Code Analyzer on PR
on:
pull_request:
branches:
- develop
jobs:
salesforce-code-analyzer-workflow:
runs-on: ubuntu-latest
steps:
- name: Check out files
uses: actions/checkout@v4
- name: Install Salesforce CLI
run: npm install -g @salesforce/cli@latest
- name: Install Salesforce Code Analyzer Plugin
run: sf plugins install @salesforce/sfdx-scanner@latest
- 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: |
echo 'Todos os arquivos:'
echo ${ALL_CHANGED_FILES}
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
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
run: exit 1