Affects PMD Version: 6.46.0
Description:
With the latest version, the cli parameter --file-list
seems to be ignored. See original bug report pmd/pmd-github-action#97
I suspect that the change #3960 introduced this regression, but not sure yet how exactly.
It could also be #3968, since we use IOUtil.toString to read the file.
While looking at the code and the new documentation, I noticed a discrepancy:
The Github Action creates a fileslist with a single line and the file names are joined with a comma. The new cli doc says, the filelist should contain one filename per line. This probably should be changed in a future version of the GitHub Action
See also the test run: https://github.com/pmd/pmd-github-action-tests/runs/6713644618?check_suite_focus=true
##[debug]Push on refs/heads/java: 87f683bdbbb5b9adef1d4a5a6dd4fd001d679b52...7bf9dc16fb014d123631a977c1f0b4bb40b99caa
##[debug] got 6 entries from page 1 to check...
##[debug] 0: added src/main/java2/AbstractClassWithoutAnyMethodSample.java
##[debug] 1: added src/main/java2/AllInOne.java
##[debug] 2: added src/main/java2/AvoidCatchingThrowableSample.java
##[debug] 3: added src/main/java2/ReturnFromFinallyBlockSample.java
##[debug] 4: added src/main/java2/UnconditionalIfStatementSample.java
##[debug] 5: added src/main/java2/UseCollectionIsEmptySample.java
##[debug] after filtering by status and with '.' 6 files remain:
##[debug] src/main/java2/AbstractClassWithoutAnyMethodSample.java, src/main/java2/AllInOne.java, src/main/java2/AvoidCatchingThrowableSample.java, src/main/java2/ReturnFromFinallyBlockSample.java, src/main/java2/UnconditionalIfStatementSample.java, src/main/java2/UseCollectionIsEmptySample.java
Running PMD 6.46.0 on 6 modified files...
/opt/hostedtoolcache/pmd/6.46.0/x64/pmd-bin-6.46.0/bin/run.sh pmd --no-cache --file-list pmd.filelist -f sarif -R ruleset.xml,category/java/design.xml/AbstractClassWithoutAnyMethod -r pmd-report.sarif
Only the files under src/main/java2
are in the filelist pmd.filelist
. But PMD also reports violations for files under src/main/java
.
Running PMD through: CLI
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4