apache / apache/maven-checkstyle-plugin

New parameter(s) to configure visibility of sections in Checkstyle reports

Open
#173 0 comments 0 reactions 0 assignees View on GitHub
enhancement
Dominant language
Java
Stars
97
Forks
67
Avg merge
14h 50m
Merged PRs (30d)
6

Description

### New feature, improvement proposal

Please consider the following Checkstyle report created with `mvn:site`:

![Image](https://github.com/user-attachments/assets/4290fb03-6862-4f30-8f05-c66428cd59f0)

As can be seen, the "Files", "Rules" and "Details" sections are empty, yet their headings and partially the tables are still displayed.

Would it be possible to introduce one new general optional parameter (or maybe a new optional parameter for each of these three sections) which hides a section if it is empty and displays it if it's not empty?

Reasons:
- In my opinon having these empty sections there doesn't add additional information.
- Personally, I don't think this looks pleasant to the eye.
- While one might argue that having these sections there all the times might be good for consistency reasons, for someone who is not familar with Checkstyle reports (or maybe Maven reports in general) this might be confusing: One might wonder what these empty sections mean - for example, seeing this for first time, I was wondering if the Checkstyle plugin maybe was not configured correctly (I was wondering if maybe the checked (yet correct) files should be listed under "Files" or if maybe the used rules to check those files should be displayed at "Rules").

I couldn't find such a parameter for the [`checkstyle:checkstyle`](https://maven.apache.org/plugins/maven-checkstyle-plugin/checkstyle-mojo.html#enableFilesSummary) or [`checkstyle:checkstyle-aggregate`](https://maven.apache.org/plugins/maven-checkstyle-plugin/checkstyle-aggregate-mojo.html) goal.

What I did find were the parameters `` and `` (I couldn't find a parameter like ``), however, those hide / display the respective sections independent of whether they are empty or not.

Contributor guide

No contributing guide indexed for this repository

Research direction

Start with the checkstyle:checkstyle and checkstyle:checkstyle-aggregate goals and compare the existing enableFilesSummary and enableRulesSummary parameters. Define how the Files, Rules, and Details sections behave when empty or populated, then verify the behavior in reports generated with mvn:site.

Written by the indexing model from the issue text.

Assessment

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.