Giter Site home page Giter Site logo

Comments (4)

romani avatar romani commented on June 7, 2024

Usually generated sources are grouped in special folders. You can exclude folder from checkstyle to validate, it depends on what plugin you use.
If all is mixed, you should just extensively use https://checkstyle.org/filters/suppressionxpathsinglefilter.html#SuppressionXpathSingleFilter to suppress all

from checkstyle.

AlBundy33 avatar AlBundy33 commented on June 7, 2024

We have one global config for all projects and libraries, jaxb, wsdl, ...
So an exclusion based on path doesn't work.

I've already seen the filter and tried to define it but the class was not ignored.
First error is on the first line because the generated class comment does not match out rules.
Also left and rigth curly braces are on the wrong line.
And so on.

Therefore I want to exclude all classes with @generated.

Does it matter if I add the filter inside the checker or the treewalker and does the ordering of the modules matter?

from checkstyle.

rnveach avatar rnveach commented on June 7, 2024

I suggest you look over https://checkstyle.org/report_issue.html#How_to_report_a_bug.3F and provide us the necessary details to assist.

The examples connected to the filters show where they should be in terms of in TreeWalker or not. XPath needs to be in TreeWalker and won't work anywhere else.

Also, XPath filter only works on TreeWalker checks. If you are looking to suppress Checker checks, then your options are probably https://checkstyle.org/filters/suppresswithnearbycommentfilter.html or https://checkstyle.org/filters/suppresswarningsfilter.html or, as suggested by, by file name or path. However, we can only guess unless you provide us a case.

Also this is probably better suited in discussions as you are asking for assistance instead of reporting a bug or asking for a feature.

from checkstyle.

AlBundy33 avatar AlBundy33 commented on June 7, 2024

ok - I've created a new discussion #14773

from checkstyle.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.