[MCHECKSTYLE-405] The checkstyle plugin should report the number of all violations

Open
#317 2 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
35/100
Issue type
Feature
Clarity
Mostly clear
Activity status
Stale
Tech stack
java
Domain
build-system

Research direction

Reproduce the two output cases using config/maven_checks.xml and the Checkstyle 8.41.1 examples in the issue. Trace the plugin's violation reporting and file-result caching entry points; done means info and warning output includes the total violations, and error output is logged at WARN level.

Written by the indexing model from the issue text.

Description

enhancement priority:major

Guillaume Nodet opened MCHECKSTYLE-405 and commented

When there is an error, the build looks like:

[INFO] There is 1 error reported by Checkstyle 8.41.1 with config/maven_checks.xml ruleset.
[ERROR] src/main/java/org/apache/maven/execution/BuildResumptionDataRepository.java:[54,30] (whitespace) ParenPad: '(' is not followed by whitespace.
 

and when this error is fixed, the build then looks like:

[INFO] You have 0 Checkstyle violations.

The problem is that checkstyle never caches the results for files with violations, even at info or warning level. This cause the files to be always processed, without the user really being aware of any problem.

The number of violations at info or warning level should also be printed. In addition, if there are errors, the output should be logged at WARN level.


1 votes, 2 watchers

Dominant language
Java
Stars
98
Forks
72
Avg merge
8h 29m
Merged PRs (30d)
12

Getting set up

  • No Dockerfile or Docker Compose file
  • Has a pull request template
  • No contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from apache/maven-checkstyle-plugin

All issues in apache/maven-checkstyle-plugin

Similar issues

More Java issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.