Skip to content
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

new filter SuppressionXpathSingleFilter #5879

Closed
romani opened this Issue Jun 2, 2018 · 5 comments

Comments

Projects
None yet
3 participants
@romani
Copy link
Member

romani commented Jun 2, 2018

taken from #65 (comment)

Inlining of filters is set of a lot of issues, it is a problem already more then 10 year. Bunch of issues like this was in sourceforge tracker. Usage of additional files is problematic if verification should be done in multiple systems and IDEs (see #5756 (comment), ....).
Additional problem is that there are two types of suppressions:

  • wide suppression (kind of part of style requirements, but Check does not allow this in configuration)
  • wont fix/false-positive suppressions. This suppressions are specific to certain code so could exists in separate file to be active only in certain project.

idea (new filter with all properties of SuppressionXpathFilter external files):

<module name="SuppressionXpathSingleFilter">
  <property name="checks" value="CyclomaticComplexity"/>
  <property name="message" value="Cyclomatic Complexity is .*"/>
  <property name="id" value="CyclomaticComplexity_special"/>
  <property name="query" value="//CLASS_DEF | //METHOD_DEF"/>
</module>

another example:

<module name="SuppressionXpathSingleFilter">
  <property name="checks" value="RedundantModifier"/>
  <property name="query" value="/INTERFACE_DEF//*"/>
</module>

vs (separate xml file part)

<suppress-xpath
                 checks="RedundantModifier"
                 query="/INTERFACE_DEF//*"
/> 

it will NOT be compact, but it will be in-lined in main config, and we do not do revolutionary changes in project for now to allow all types of tags and inline configuration under module tag.

All functionality of filtering is already implemented, new filter just need to reuse it.

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

@romani

This comment has been minimized.

Copy link
Member Author

romani commented Jun 2, 2018

@rnveach , @jodastephen , as we agree on design, next step is to make it happen.
I can not continue with implementation as I have huge backlog of PRs, where people are waiting for me for long time. Issue is approved, so PullRequest is welcome.

@jodastephen , as you are primary/first user of this feature, if you know any engineer who can make this implementation we will help him with with development process, and guide him on what to change and how. This issue is simple, even junior engineer can make it.

@romani

This comment has been minimized.

Copy link
Member Author

romani commented Sep 9, 2018

@jack870131 , can you help us with this issue ?

@jack870131

This comment has been minimized.

Copy link
Contributor

jack870131 commented Sep 9, 2018

I am on it.

jack870131 added a commit to jack870131/checkstyle that referenced this issue Oct 27, 2018

jack870131 added a commit to jack870131/checkstyle that referenced this issue Oct 27, 2018

jack870131 added a commit to jack870131/checkstyle that referenced this issue Oct 27, 2018

jack870131 added a commit to jack870131/checkstyle that referenced this issue Nov 13, 2018

jack870131 added a commit to jack870131/checkstyle that referenced this issue Nov 13, 2018

jack870131 added a commit to jack870131/checkstyle that referenced this issue Nov 13, 2018

jack870131 added a commit to jack870131/checkstyle that referenced this issue Nov 13, 2018

jack870131 added a commit to jack870131/checkstyle that referenced this issue Nov 13, 2018

jack870131 added a commit to jack870131/checkstyle that referenced this issue Nov 13, 2018

jack870131 added a commit to jack870131/checkstyle that referenced this issue Nov 13, 2018

jack870131 added a commit to jack870131/checkstyle that referenced this issue Nov 15, 2018

jack870131 added a commit to jack870131/checkstyle that referenced this issue Nov 20, 2018

jack870131 added a commit to jack870131/checkstyle that referenced this issue Nov 20, 2018

jack870131 added a commit to jack870131/checkstyle that referenced this issue Nov 21, 2018

jack870131 added a commit to jack870131/checkstyle that referenced this issue Nov 27, 2018

jack870131 added a commit to jack870131/checkstyle that referenced this issue Nov 27, 2018

jack870131 added a commit to jack870131/checkstyle that referenced this issue Dec 28, 2018

jack870131 added a commit to jack870131/checkstyle that referenced this issue Jan 3, 2019

jack870131 added a commit to jack870131/checkstyle that referenced this issue Jan 3, 2019

jack870131 added a commit to jack870131/checkstyle that referenced this issue Jan 3, 2019

jack870131 added a commit to jack870131/checkstyle that referenced this issue Jan 5, 2019

jack870131 added a commit to jack870131/checkstyle that referenced this issue Jan 9, 2019

jack870131 added a commit to jack870131/checkstyle that referenced this issue Jan 9, 2019

jack870131 added a commit to jack870131/checkstyle that referenced this issue Jan 10, 2019

jack870131 added a commit to jack870131/checkstyle that referenced this issue Jan 10, 2019

jack870131 added a commit to jack870131/checkstyle that referenced this issue Jan 10, 2019

jack870131 added a commit to jack870131/checkstyle that referenced this issue Jan 10, 2019

jack870131 added a commit to jack870131/checkstyle that referenced this issue Jan 10, 2019

jack870131 added a commit to jack870131/checkstyle that referenced this issue Jan 10, 2019

jack870131 added a commit to jack870131/checkstyle that referenced this issue Jan 11, 2019

jack870131 added a commit to jack870131/checkstyle that referenced this issue Jan 11, 2019

jack870131 added a commit to jack870131/checkstyle that referenced this issue Jan 29, 2019

jack870131 added a commit to jack870131/checkstyle that referenced this issue Jan 29, 2019

jack870131 added a commit to jack870131/checkstyle that referenced this issue Jan 30, 2019

jack870131 added a commit to jack870131/checkstyle that referenced this issue Jan 30, 2019

jack870131 added a commit to jack870131/checkstyle that referenced this issue Jan 30, 2019

jack870131 added a commit to jack870131/checkstyle that referenced this issue Jan 30, 2019

jack870131 added a commit to jack870131/checkstyle that referenced this issue Jan 31, 2019

jack870131 added a commit to jack870131/checkstyle that referenced this issue Feb 1, 2019

jack870131 added a commit to jack870131/checkstyle that referenced this issue Feb 1, 2019

rnveach added a commit that referenced this issue Feb 3, 2019

@rnveach

This comment has been minimized.

Copy link
Member

rnveach commented Feb 3, 2019

New filter was added.

@rnveach rnveach closed this Feb 3, 2019

@rnveach rnveach added this to the 8.18 milestone Feb 3, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.