GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | |||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | |||
GeezerVison is showing github.com — [cli] Print PMD analysis summary by DragonFSKY · Pull Request #6823 · pmd/pmd Conversation
|
|
Compared to main: (comment created at 2026-07-05 19:06:05+00:00 for 8a4a1ce) |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
I just tried this.
$ ./pmd check --dir=/data/code/pmd/pmd/main/pmd-java/src/main/java -R rulesets/java/quickstart.xml
[WARN] Progressbar rendering conflicts with reporting to STDOUT. No progressbar will be shown. Try running with argument -r <file> to output the report to a file instead.
[WARN] This analysis could be faster, please consider using Incremental Analysis: https://docs.pmd-code.org/latest/pmd_userdocs_incremental_analysis.html
/data/code/pmd/pmd/main/pmd-java/src/main/java/net/sourceforge/pmd/lang/java/ast/ASTAmbiguousName.java:74: CompareObjectsWithEquals: Use equals() to compare object references.
[...]
/data/code/pmd/pmd/main/pmd-java/src/main/java/net/sourceforge/pmd/lang/java/types/internal/infer/ResolutionFailedException.java:102: LocalVariableNamingConventions: The final local variable name 'PRETTY_PRINTER_CONFIG' doesn't match '[a-z][a-zA-Z0-9]*'
[INFO] Found 101 violations.
$
Works as expected.
$ ./pmd check --dir=/data/code/pmd/pmd/main/pmd-java/src/main/java -R rulesets/java/quickstart.xml --format=text -r out.txt
[WARN] This analysis could be faster, please consider using Incremental Analysis: https://docs.pmd-code.org/latest/pmd_userdocs_incremental_analysis.html
$
Uh... where is the summary?
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
7d1adbb to
1e17172
Compare
|
Thanks for checking. I moved the summary logging after PMD finishes closing its listeners, so the progress bar cleanup no longer hides it when --report-file is used. I also applied the wording suggestion and added a regression test for this case. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
@UncleOwen I updated this PR to match the requested wording and to fix the summary visibility issue: summary logging is now after PMD listener cleanup and I added regression coverage for the progress-bar/report-file path. I also updated the PR description example from |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Thanks. I'm not a fan of all those telescoping runCli() calls (those tend to grow and become unmanageable over time), that's why I replaced them with a builder pattern.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
The progressbar uses JLine to determine the terminal width. Under Windows in git bash (PWD and MSYSTEM are set), JLine uses the exec terminal provider, which runs "tty.exe" with the inherited stdin of the forked surefire JVM. As surefire is reading from stdin (command channel) at the same time, tty.exe doesn't start until that read completes. This made PmdCliTest hang (locally) or take about 9.5 minutes (in the Windows CI build). This happened before and was worked around in d1d10d1 by adding "--no-progress" to the standard arguments of PmdCliTest. The test reportsSummaryAfterProgressBarWithReportFile (added with #6823) needs the progress bar and doesn't use these standard arguments, so the problem came back. The tests don't need a real terminal, so disable the exec provider for all pmd-cli tests instead. Co-authored-by: Claude Opus 5.5 <[email protected]>
There was an error while loading. Please reload this page.
Successfully merging this pull request may close these issues.
[core] PMD should display number of rules violated or errors found
There was an error while loading. Please reload this page.