New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SuppressionFilter: add suppression by message #2804

Closed
rnveach opened this Issue Jan 6, 2016 · 8 comments

Comments

Projects
None yet
3 participants
@rnveach
Member

rnveach commented Jan 6, 2016

http://checkstyle.sourceforge.net/config_filters.html#SuppressionFilter

I would like an option in the "suppression.xml" to suppress specific messages of a check.

Currently I am trying to extend my javadoc collection. I know alot of them don't exist, but I still want to validate the ones that do exist. Most of the javadoc checks, like JavadocTypeCheck, report multiple errors including that the javadoc is missing. To prevent my console from being flooded with missing errors, I would like to suppress them, however "suppressions.xml" only supports suppressing the check as a whole and not the individual errors it reports.
The only option currently is to suppress the check as a whole and hide errors with existing javadocs, which I don't think is a good idea. Or show all errors and try to weed out the 'missing' errors manually, which can be a pain when there are alot.

My example suppressing javadoc is missing message from all checks:

<suppressions>
    <suppress messages="Missing a Javadoc comment\." />
</suppressions>

With this suppression and my config containing "JavadocTypeCheck", I expect to see no errors reporting my javadoc is missing (javadoc.missing), and expect to see other errors like a tag is missing (type.missingTag).

@romani

This comment has been minimized.

Show comment
Hide comment
@romani

romani Jan 8, 2016

Member

update need to be done for XML structure http://checkstyle.sourceforge.net/config.html#XML_Structure "Suppressions XML Document" .

messages should be RegExp type.

This is issue is blocked by #1571

Member

romani commented Jan 8, 2016

update need to be done for XML structure http://checkstyle.sourceforge.net/config.html#XML_Structure "Suppressions XML Document" .

messages should be RegExp type.

This is issue is blocked by #1571

@romani romani added the approved label Jan 8, 2016

@rnveach

This comment has been minimized.

Show comment
Hide comment
@rnveach

rnveach Jan 21, 2016

Member

IT/Test javadoc suppressions (

<suppress checks="Javadoc" files=".*[\\/]src[\\/](test|it)[\\/]"/>
) could be changed with this feature to only ignore missing javadocs and report errors on written ones.

Test currently has 86 reported javadoc errors. 9 of them are just missing authors.
IT currently has 6 reported javadoc errors.

Member

rnveach commented Jan 21, 2016

IT/Test javadoc suppressions (

<suppress checks="Javadoc" files=".*[\\/]src[\\/](test|it)[\\/]"/>
) could be changed with this feature to only ignore missing javadocs and report errors on written ones.

Test currently has 86 reported javadoc errors. 9 of them are just missing authors.
IT currently has 6 reported javadoc errors.

@timurt

This comment has been minimized.

Show comment
Hide comment
@timurt

timurt Apr 12, 2017

Collaborator

I am on it

Collaborator

timurt commented Apr 12, 2017

I am on it

@rnveach

This comment has been minimized.

Show comment
Hide comment
@rnveach

rnveach Apr 12, 2017

Member

@timurt Please read full issue especially the 2nd post, this is blocked by another issue which I am not sure you can do.

Member

rnveach commented Apr 12, 2017

@timurt Please read full issue especially the 2nd post, this is blocked by another issue which I am not sure you can do.

@timurt

This comment has been minimized.

Show comment
Hide comment
@timurt

timurt Apr 12, 2017

Collaborator

@rnveach ok, I will look for another issue, thanks

Collaborator

timurt commented Apr 12, 2017

@rnveach ok, I will look for another issue, thanks

@rnveach

This comment has been minimized.

Show comment
Hide comment
@rnveach

rnveach May 25, 2017

Member

@MEZk @romani Just want to confirm, this is now part of GSoC? I thought GSoC was only going to do XPath suppression?
It was added to the project but not given the GSoC label.

Member

rnveach commented May 25, 2017

@MEZk @romani Just want to confirm, this is now part of GSoC? I thought GSoC was only going to do XPath suppression?
It was added to the project but not given the GSoC label.

@romani romani removed this from To Do in Flexible Suppression Model May 25, 2017

@romani

This comment has been minimized.

Show comment
Hide comment
@romani

romani May 25, 2017

Member

It is not related to GSoC project, could be done at any time .

Member

romani commented May 25, 2017

It is not related to GSoC project, could be done at any time .

rnveach added a commit to rnveach/checkstyle that referenced this issue Oct 26, 2017

rnveach added a commit to rnveach/checkstyle that referenced this issue Oct 27, 2017

rnveach added a commit to rnveach/checkstyle that referenced this issue Dec 1, 2017

rnveach added a commit to rnveach/checkstyle that referenced this issue Dec 3, 2017

rnveach added a commit to rnveach/checkstyle that referenced this issue Dec 3, 2017

rnveach added a commit to rnveach/checkstyle that referenced this issue Dec 9, 2017

rnveach added a commit to rnveach/checkstyle that referenced this issue Dec 9, 2017

rnveach added a commit to rnveach/checkstyle that referenced this issue Dec 9, 2017

rnveach added a commit to rnveach/checkstyle that referenced this issue Dec 9, 2017

romani added a commit that referenced this issue Dec 10, 2017

@romani romani added the new feature label Dec 10, 2017

@romani romani added this to the 8.6 milestone Dec 10, 2017

@romani

This comment has been minimized.

Show comment
Hide comment
@romani

romani Dec 10, 2017

Member

fix is merged.

Member

romani commented Dec 10, 2017

fix is merged.

@romani romani closed this Dec 10, 2017

timurt added a commit to timurt/checkstyle that referenced this issue Dec 19, 2017

timurt added a commit to timurt/checkstyle that referenced this issue Dec 19, 2017

@romani romani changed the title from Feature to suppress specific message of a check to SuppressionFilter: add suppression by message Dec 30, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment