Added spotbugs and errorprone plugins.
This commit is contained in:
parent
05531406a9
commit
dc82c66d68
3 changed files with 27 additions and 1 deletions
12
build.gradle
12
build.gradle
|
@ -4,8 +4,12 @@ plugins {
|
|||
id "com.jfrog.bintray" version "1.8.3"
|
||||
id "com.github.ben-manes.versions" version "0.20.0"
|
||||
id "net.thauvin.erik.gradle.semver" version "0.9.5-beta"
|
||||
id "com.github.spotbugs" version "1.6.2"
|
||||
id "net.ltgt.errorprone" version "0.0.14"
|
||||
}
|
||||
|
||||
|
||||
import com.github.spotbugs.SpotBugsTask
|
||||
import org.apache.tools.ant.taskdefs.condition.Os
|
||||
|
||||
defaultTasks 'check'
|
||||
|
@ -35,6 +39,7 @@ repositories {
|
|||
|
||||
dependencies {
|
||||
compile 'com.github.spullara.mustache.java:compiler:0.9.5'
|
||||
spotbugsPlugins 'com.h3xstream.findsecbugs:findsecbugs-plugin:1.7.1'
|
||||
testCompile 'org.testng:testng:6.14.3'
|
||||
}
|
||||
|
||||
|
@ -137,6 +142,13 @@ test {
|
|||
useTestNG()
|
||||
}
|
||||
|
||||
tasks.withType(SpotBugsTask) {
|
||||
reports {
|
||||
xml.enabled = false
|
||||
html.enabled = true
|
||||
}
|
||||
excludeFilter = file("$projectDir/config/spotbugs/excludeFilter.xml")
|
||||
}
|
||||
compileJava {
|
||||
options.compilerArgs.add('-proc:none')
|
||||
}
|
||||
|
|
14
config/spotbugs/excludefilter.xml
Normal file
14
config/spotbugs/excludefilter.xml
Normal file
|
@ -0,0 +1,14 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<FindBugsFilter
|
||||
xmlns="https://github.com/spotbugs/filter/3.0.0"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="https://github.com/spotbugs/filter/3.0.0 https://raw.githubusercontent.com/spotbugs/spotbugs/3.1.0/spotbugs/etc/findbugsfilter.xsd">
|
||||
<Match>
|
||||
<Class name="net.thauvin.erik.semver.VersionProcessor"/>
|
||||
<Or>
|
||||
<Method name="writeTemplate"/>
|
||||
<Method name="findValues"/>
|
||||
</Or>
|
||||
<Bug code="SECPTI"/>
|
||||
</Match>
|
||||
</FindBugsFilter>
|
|
@ -159,7 +159,7 @@ public class VersionInfoTest {
|
|||
}
|
||||
}
|
||||
|
||||
@SuppressWarnings("ClassExplicitlyAnnotation")
|
||||
@SuppressWarnings({"ClassExplicitlyAnnotation", "BadAnnotationImplementation"})
|
||||
class VersionTest implements Version {
|
||||
@Override
|
||||
public Class<? extends Annotation> annotationType() {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue