Is it possible to specify a filter file for FindBugs using M9 and the built-in plugin?


(Jamie Bisotti) #1

I’m using M9 and the new FindBugs plugin. I need to specify a filter file (a sub-set of my Sonar rules) for FindBugs to use. In looking through the docs, I do not see any reference to a filter file (but I’ve overlooked some things here lately). Is this currently possible? If not, will it be in 1.0?

Thanks,

Jamie


(Justin Ryan) #2

Not yet, but I’m working on a pull request right now, it should be done in a few days. It’ll include excludeFilter and includeFilter.


(René Groeschke) #3

Hello Jamie, at the moment its not possible to pass a filter file to the built-in findbugs plugin. You can use ‘exclude’ and ‘include’ of FileCollection to exclude specific files from being analyzed.

@Justin FYI: We refactored some stuff in the gradle Findbugs task related to http://issues.gradle.org/browse/GRADLE-2167.

regards, René


(Justin Ryan) #4

@Jamie includeFilter and excludeFilter are what you’re looking for. effort, reportingLevel, visitors, and omitVisitors will also be supported.

@Rene I had my pull request all ready to go, then I saw those GRADLE-2167 changes, so I had to refactor a bit. I had an issue with FindBugs never finishing, but that was FindBugs specific and I got past it. It probably could use a few more integration tests, but I don’t want to get into the business of testing FindBugs functionality. Submitted pull request: https://github.com/gradle/gradle/pull/78


(René Groeschke) #5

Hey justin, thanks for the pull request. I’ll hopefully find the time to have a look at it soon.

regards, René


(Jamie Bisotti) #6

Excellent! Thanks Justin.