I get the feeling that it doesn't like my PMD rules. Eslint seems to dislike them too, but this is a tool that I'd expect to get it. I don't know what the diffBetweenCurrentAndParentBranch.txt
file is - are you able to support incremental vs full scans?
Is it hurting because I have no Apex code and basically no metadata? It's a base project template so I have all the things I like set up the way I like them for new projects.
This is my workflow job:
pmd-spano-scanner:
runs-on: ubuntu-latest
needs: format-lint-lwc-tests
if: ${{ github.actor != 'dependabot[bot]' }}
steps:
# Checkout the source code
- name: 'Checkout source code'
uses: actions/checkout@v3
- name: Install SFDX CLI and Scanner
run: |
npm install sfdx-cli
node_modules/sfdx-cli/bin/run plugins:install @salesforce/sfdx-scanner
- name: Run SFDX Scanner - Report findings as comments
uses: mitchspano/[email protected]
with:
pmdconfig: 'pmd/deployRules.xml'
severity-threshold: 1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Error message:
Run mitchspano/[email protected]
with:
pmdconfig: pmd/deployRules.xml
severity-threshold: 1
env:
GITHUB_TOKEN: ***
Getting difference within the pull request...
fatal: ambiguous argument 'origin/undefined...origin/undefined': unknown revision or path not in the working tree.
Use '--' to separate paths from revisions, like this:
'git <command> [<revision>...] -- [<file>...]'
node:child_process:8[2](https://github.com/dschach/BaseSFDXProject/actions/runs/3454017819/jobs/5765037153#step:4:2)6
err = new Error(msg);
^
Error: Command failed: git diff origin/undefined...origin/undefined > diffBetweenCurrentAndParentBranch.txt
fatal: ambiguous argument 'origin/undefined...origin/undefined': unknown revision or path not in the working tree.
Use '--' to separate paths from revisions, like this:
'git <command> [<revision>...] -- [<file>...]'
at checkExecSyncError (node:child_process:826:11)
at execSync (node:child_process:900:15)
at getDiffInPullRequest (/home/runner/work/_actions/mitchspano/sfdx-scan-pull-request/v0.1.[3](https://github.com/dschach/BaseSFDXProject/actions/runs/3454017819/jobs/5765037153#step:4:3)/index.js:78:3)
at main (/home/runner/work/_actions/mitchspano/sfdx-scan-pull-request/v0.1.3/index.js:280:3)
at Object.<anonymous> (/home/runner/work/_actions/mitchspano/sfdx-scan-pull-request/v0.1.3/index.js:287:1)
at Module._compile (node:internal/modules/cjs/loader:1101:1[4](https://github.com/dschach/BaseSFDXProject/actions/runs/3454017819/jobs/5765037153#step:4:4))
at Object.Module._extensions..js (node:internal/modules/cjs/loader:11[5](https://github.com/dschach/BaseSFDXProject/actions/runs/3454017819/jobs/5765037153#step:4:5)3:10)
at Module.load (node:internal/modules/cjs/loader:981:32)
at Function.Module._load (node:internal/modules/cjs/loader:822:12)
at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:81:12) {
status: 128,
signal: null,
output: [
null,
Buffer(0) [Uint8Array] [],
Buffer(21[6](https://github.com/dschach/BaseSFDXProject/actions/runs/3454017819/jobs/5765037153#step:4:6)) [Uint8Array] [
102, 9[7](https://github.com/dschach/BaseSFDXProject/actions/runs/3454017819/jobs/5765037153#step:4:7), 116, 9[7](https://github.com/dschach/BaseSFDXProject/actions/runs/3454017819/jobs/5765037153#step:4:8), 10[8](https://github.com/dschach/BaseSFDXProject/actions/runs/3454017819/jobs/5765037153#step:4:9), 58, 32, [9](https://github.com/dschach/BaseSFDXProject/actions/runs/3454017819/jobs/5765037153#step:4:10)7, [10](https://github.com/dschach/BaseSFDXProject/actions/runs/3454017819/jobs/5765037153#step:4:11)9, 98, 105, 103,
[11](https://github.com/dschach/BaseSFDXProject/actions/runs/3454017819/jobs/5765037153#step:4:12)7, 111, 117, 115, 32, 97, 114, 103, 117, 109, 101, 110,
116, 32, 39, 111, 114, 105, 103, 105, 110, 47, 117, 110,
100, 101, 102, 105, 110, 101, 100, 46, 46, 46, 111, 114,
105, 103, 105, 110, 47, 117, 110, 100, 101, 102, 105, 110,
101, 100, 39, 58, 32, 117, 110, 107, 110, 111, 119, 110,
32, 114, 101, 118, 105, 115, 105, 111, 110, 32, 111, 114,
32, 1[12](https://github.com/dschach/BaseSFDXProject/actions/runs/3454017819/jobs/5765037153#step:4:13), 97, 116, 104, 32, 110, 111, 116, 32, 105, 110,
32, 116, 104, 101,
... 116 more items
]
],
pid: 1949,
stdout: Buffer(0) [Uint8Array] [],
stderr: Buffer(216) [Uint8Array] [
102, 97, 116, 97, 108, 58, 32, 97, 109, 98, 105, 103,
117, 111, 117, 115, 32, 97, 1[14](https://github.com/dschach/BaseSFDXProject/actions/runs/3454017819/jobs/5765037153#step:4:15), 103, 117, 109, 101, 110,
116, 32, 39, 111, 114, 105, 103, 105, 110, 47, 117, 110,
100, 101, 102, 105, 110, 101, 100, 46, 46, 46, 111, 114,
105, 103, 105, 110, 47, 117, 110, 100, 101, 102, 105, 110,
101, 100, 39, 58, 32, 117, 110, 107, 110, 111, 119, 110,
32, 114, 101, 118, 105, 1[15](https://github.com/dschach/BaseSFDXProject/actions/runs/3454017819/jobs/5765037153#step:4:16), 105, 111, 110, 32, 111, 114,
32, 112, 97, 1[16](https://github.com/dschach/BaseSFDXProject/actions/runs/3454017819/jobs/5765037153#step:4:17), 104, [32](https://github.com/dschach/BaseSFDXProject/actions/runs/3454017819/jobs/5765037153#step:4:33), 110, 111, 116, 32, 105, 110,
32, 116, 104, 101,
... 116 more items
]
}