You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[core] PMD should display number of rules violated or errors found #1995
an:enhancementAn improvement on existing features / rulesgood first issueA great starting point for new contributorsin:cliAffects the PMD Command Line Interface
Description:
PMD output does not inform the user as to the number of rules contravened while running the tool. The user has to look at the output file.
changed the title [-][java] PMD must display number of rules contravened or errors found. [/-][+][core] PMD must display number of rules contravened or errors found[/+]on Sep 2, 2019
No intention to parse the output, as yet.
The original request was to display the number of errors.
My mistake about the shell error codes. A glaring one.
Hey guys sorry for taking so long to come back on this. I can see a similar implementation that already exists here. This is triggered by passing the flag: -f textcolor . What exactly are we looking from this enhancement?
@ThanasisGkanos Tbh even with while running the tool I think the question is very vague. If it was the case that OP's looking for a progress indicator, then changing the exit code would have been pointless.
@Fernal73 Why do you want to read the number of rules? Do you need to parse it or do you just think it would be useful info for an end-user? Are you asking for a progress indicator during the run, or just a summary line at the end? What renderer are you using?
changed the title [-][core] PMD must display number of rules contravened or errors found[/-][+][core] PMD must display number of rules violated or errors found[/+]on Apr 29, 2022
changed the title [-][core] PMD must display number of rules violated or errors found[/-][+][core] PMD should display number of rules violated or errors found[/+]on Apr 29, 2022
Ok, I went through all the comments and hid all that were off topic.
The task here is as follows:
When you run PMD on the command line (see https://pmd.github.io/latest/pmd_userdocs_cli_reference.html), PMD just executes and terminates when it has finished. There is no visual output at all to tell the user e.g. "Found 11 violations. And there were 2 processing errors.".
Or in case, no problems have been detected, the output could be something like "Found no violations.".
Especially there is no output, if you write the report to a file (--report-file).
I don't see an active PR or assignee for this. I'm preparing a small CLI-only implementation that prints the existing violation/processing-error counts through the CLI reporter without changing report output or exit codes. Happy to defer if someone is actively working on it.
an:enhancementAn improvement on existing features / rulesgood first issueA great starting point for new contributorsin:cliAffects the PMD Command Line Interface
Activity
[-][java] PMD must display number of rules contravened or errors found. [/-][+][core] PMD must display number of rules contravened or errors found[/+]agkanos commentedon Sep 28, 2019
linusjf commentedon Oct 8, 2019
linusjf commentedon Oct 8, 2019
adangel commentedon Oct 8, 2019
linusjf commentedon Oct 8, 2019
linusjf commentedon Oct 8, 2019
linusjf commentedon Oct 9, 2019
linusjf commentedon Oct 9, 2019
oowekyala commentedon Oct 9, 2019
linusjf commentedon Oct 9, 2019
agkanos commentedon Oct 9, 2019
Hey guys sorry for taking so long to come back on this. I can see a similar implementation that already exists here. This is triggered by passing the flag:
-f textcolor. What exactly are we looking from this enhancement?Ok I missed the: while running the tool
oowekyala commentedon Oct 9, 2019
@ThanasisGkanos Tbh even with while running the tool I think the question is very vague. If it was the case that OP's looking for a progress indicator, then changing the exit code would have been pointless.
@Fernal73 Why do you want to read the number of rules? Do you need to parse it or do you just think it would be useful info for an end-user? Are you asking for a progress indicator during the run, or just a summary line at the end? What renderer are you using?
13 remaining items
04Deek commentedon Apr 29, 2022
hii guys, I am intersted to look into [core] PMD must display number of rules contravened or errors found. I want to understand and confirm that, do we need to show proper count of errors found in each module to the user?
[-][core] PMD must display number of rules contravened or errors found[/-][+][core] PMD must display number of rules violated or errors found[/+][-][core] PMD must display number of rules violated or errors found[/-][+][core] PMD should display number of rules violated or errors found[/+]adangel commentedon Apr 29, 2022
Ok, I went through all the comments and hid all that were off topic.
The task here is as follows:
When you run PMD on the command line (see https://pmd.github.io/latest/pmd_userdocs_cli_reference.html), PMD just executes and terminates when it has finished. There is no visual output at all to tell the user e.g. "Found 11 violations. And there were 2 processing errors.".
Or in case, no problems have been detected, the output could be something like "Found no violations.".
Especially there is no output, if you write the report to a file (
--report-file).See also https://github.com/pmd/pmd/wiki/Newcomers%27-Guide
abhinavashok commentedon Dec 13, 2023
Is anyone working on this ?
adangel commentedon Dec 14, 2023
@abhinavashok I don't think so.
xiao-hui-ux commentedon Oct 1, 2024
Hi, I would want to work on this issue.
DragonFSKY commentedon Jun 28, 2026
I don't see an active PR or assignee for this. I'm preparing a small CLI-only implementation that prints the existing violation/processing-error counts through the CLI reporter without changing report output or exit codes. Happy to defer if someone is actively working on it.