It's possible to create a baseline for project code (e.g. the code will be checked from a moment of time specified by me and current issues will be ignored) for Checkstyle
and Findbugs
using Maven or something else?
Asked
Active
Viewed 532 times
1

h3xStream
- 6,293
- 2
- 47
- 57
-
It's not that clear to me what you mean by "the code will be checked from a moment of time specified by me", but you can create a Maven archetype which will contain rules for Checkstyle and Findbugs as well as other required files (some java code, test classes, whatever). Then you can create a project based on that archetype. – TheJavaGuy-Ivan Milosavljević Jul 16 '18 at 08:04
-
For example: my code in this moment has some issues found by checkstyle and findbugs and I want to ignore this issues and at every run to ignore it and check for new issues. – Jul 16 '18 at 08:07
1 Answers
0
There is a plugin for checkstyle https://maven.apache.org/components/plugins/maven-checkstyle-plugin/ that allows you to execute the validation whenever you want, for findbugs, i don't know.
So my suggestion is to disable from the build the checkstyle "mvn [target] -Dcheckstyle.skip" , and run the report validations with the plugin.

Ramon jansen gomez
- 352
- 3
- 17
-
I want to run the checkstyleat build, but just for code that I'll write in the future and ignore the old code. – Jul 16 '18 at 09:40
-
I dont thinks thats possible, it applies always for all the code, you can ignore some files(i dont recommend you that) or extensions. https://stackoverflow.com/questions/1012407/how-to-suppress-all-checks-for-a-file-in-checkstyle – Ramon jansen gomez Jul 16 '18 at 10:31