This repository was archived by the owner on Mar 11, 2022. It is now read-only.
File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -57,15 +57,15 @@ stage('QA') {
5757
5858 // Standard builds do Findbugs and test against Cloudant
5959 def axes = [
60- Findbugs :
60+ Spotbugs :
6161 {
6262 node {
6363 unstash name : ' built'
64- // findBugs
64+ // Spotbugs
6565 try {
66- sh ' ./gradlew -Dfindbugs .xml.report=true findbugsMain '
66+ sh ' ./gradlew -Dspotbugs .xml.report=true spotbugsMain '
6767 } finally {
68- step([$ class : ' FindBugsPublisher ' , pattern : ' **/build/reports/findbugs /*.xml' ] )
68+ recordIssues enabledForFailure : true , tool : spotBugs( pattern : ' **/build/reports/spotbugs /*.xml' )
6969 }
7070 }
7171 },
Original file line number Diff line number Diff line change 1212 * and limitations under the License.
1313 */
1414
15+ plugins {
16+ id " com.github.spotbugs" version " 2.0.0" apply false
17+ }
18+
1519subprojects {
1620 apply plugin : ' java'
1721 apply plugin : ' maven'
@@ -175,24 +179,24 @@ subprojects {
175179 }
176180
177181 // Findbugs
178- apply plugin : ' findbugs '
179- findbugs {
180- toolVersion = " 3.0.1 "
182+ apply plugin : ' com.github.spotbugs '
183+ spotbugs {
184+ toolVersion = " 3.1.12 "
181185 // Report only high severity bugs for now
182186 reportLevel = " low"
183187 // The code base is pretty small so use max effort
184188 effort = " max"
185189 // We don't want to run findbugs on the test code yet
186190 sourceSets = [sourceSets. main]
187191 // Exclude a couple of known bugs until we get the chance to fix them
188- if (file(" findbugs_excludes .xml" ). exists()) {
189- excludeFilter = file(" findbugs_excludes .xml" )
192+ if (file(" spotbugs_excludes .xml" ). exists()) {
193+ excludeFilter = file(" spotbugs_excludes .xml" )
190194 }
191195 }
192196
193- tasks. withType(FindBugs ) {
197+ tasks. withType(com.github.spotbugs.SpotBugsTask ) {
194198 // Currently only one report type can be used toggle which with a property
195- boolean generateXML = Boolean . getBoolean(" findbugs .xml.report" )
199+ boolean generateXML = Boolean . getBoolean(" spotbugs .xml.report" )
196200 reports {
197201 xml. enabled = generateXML
198202 html. enabled = ! generateXML
File renamed without changes.
File renamed without changes.
You can’t perform that action at this time.
0 commit comments