Comments (4)
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.
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.
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.
ok - I've created a new discussion #14773
from checkstyle.
Related Issues (20)
- Improve documentation - how to add usage of `var` to check `IllegalType`? HOT 6
- Column number in `DetailNode` should start with 1 HOT 16
- LITERAL_DEFAULT token support in RightCurlyCheck
- False Negative of ClassFanOutCheck with "new" Keyword HOT 6
- MagicNumberCheck NPE when ignoring field declarations HOT 11
- Parse exception for RAW string template (Java 21+) HOT 3
- IllegalType Not Working For Annotation Using FQN HOT 3
- Remove Support for String Template Syntax
- Re-enable and Monitor `YAMLSchemaValidation` inspection HOT 6
- Resolve `TailRecursion` inspection violations by replacing tail recursive calls HOT 4
- log() method incorrectly calculates the column number when Tabs are used HOT 8
- WhitespaceAround reports a violation when switch expression is passed as a method argument HOT 2
- Parameter name should be provided after @param tag HOT 1
- Please REMOVE most badges from the README HOT 5
- Please, add a small section to the README on how to install and use this tool HOT 5
- Test to ensure website checks/filters are in alphabetical order
- Fix performance test HOT 3
- build failure due to maven.plugin.json HOT 2
- Github generate site fails to generate links with anchors.
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from checkstyle.