I am having trouble excluding certain types of files when using findbugs.
// FindBugs
apply plugin: 'findbugs'
findbugs {
toolVersion = "3.0.1"
sourceSets = [sourceSets.main]
ignoreFailures = true
reportsDir = file("$project.buildDir/findbugsReports")
effort = "max"
reportLevel = "high"
excludeFilter = file("$rootDir/gradle/config/findbugs/exclude.xml")
ignoreFailures = true
}
exclude.xml
<FindBugsFilter>
<Match>
<Source name="**/*.scala" />
<Source name="**/*.xml" />
<Source name="**/*.zip" />
<Source name="**/*.list" />
<Source name="**/*.ftl" />
<Source name="**/*.ts" />
<Source name="**/*.proto"/>
<Source name="**/*.txt"/>
</Match>
<!-- (i.e., classes ending in 'Test' or 'Tests', and inner classes of same) -->
<!-- excluding source should suffice but it doesn't work-->
<Match>
<Class name="~.*\.*Tests?(\$.*)?" />
<Class name="~.*\.list" />
<Class name="~.*\.Manifest\$.*"/>
<Class name="~.*\.ftl\$.*"/>
<Class name="~.*\.ts\$.*"/>
<Class name="~.*\.*list.*"/>
<Class name="~.*\.zip\$.*"/>
<Class name="~.*\.xml\$.*"/>
<Class name="~.*\.properties"/>
</Match>
</FindBugsFilter>
I get errors:
java.io.IOException: Wrong magic bytes of 2320416c for zip file
What is the correct way to exclude files ending with blah?