Skip to content

Commit a6d6ba9

Browse files
vanniktechakarnokd
authored andcommitted
1.x: Add Findbugs (ReactiveX#4099)
1 parent d855a29 commit a6d6ba9

File tree

1 file changed

+23
-8
lines changed

1 file changed

+23
-8
lines changed

build.gradle

Lines changed: 23 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,18 @@
11
buildscript {
2-
repositories {
3-
jcenter()
2+
repositories {
3+
jcenter()
44
}
5-
dependencies {
5+
dependencies {
66
classpath 'com.netflix.nebula:gradle-rxjava-project-plugin:4.0.0'
7-
classpath 'ru.vyarus:gradle-animalsniffer-plugin:1.1.0'
7+
classpath 'ru.vyarus:gradle-animalsniffer-plugin:1.1.0'
88
}
99
}
1010

1111
description = 'RxJava: Reactive Extensions for the JVM – a library for composing asynchronous and event-based programs using observable sequences for the Java VM.'
1212

1313
apply plugin: 'java'
1414
apply plugin: 'pmd'
15+
apply plugin: 'findbugs'
1516
apply plugin: 'jacoco'
1617
apply plugin: 'ru.vyarus.animalsniffer'
1718
apply plugin: 'nebula.rxjava-project'
@@ -98,15 +99,15 @@ pmdMain {
9899
task pmdPrint(dependsOn: 'pmdMain') << {
99100
File file = new File('build/reports/pmd/main.xml')
100101
if (file.exists()) {
101-
102+
102103
println("Listing first 100 PMD violations")
103-
104+
104105
file.eachLine { line, count ->
105106
if (count <= 100) {
106107
println(line)
107108
}
108109
}
109-
110+
110111
} else {
111112
println("PMD file not found.")
112113
}
@@ -116,4 +117,18 @@ build.dependsOn pmdPrint
116117

117118
animalsniffer {
118119
annotation = 'rx.internal.util.SuppressAnimalSniffer'
119-
}
120+
}
121+
122+
findbugs {
123+
ignoreFailures true
124+
toolVersion = '3.0.1'
125+
effort = 'max'
126+
reportLevel = 'low'
127+
}
128+
129+
findbugsMain {
130+
reports {
131+
html.enabled = false // Findbugs can only have on report enabled
132+
xml.enabled = true
133+
}
134+
}

0 commit comments

Comments
 (0)