Skip to content

Commit

Permalink
Apply spotbugs to OSS repo (#12941)
Browse files Browse the repository at this point in the history
* add spotbugs configuration
  • Loading branch information
alovew committed May 18, 2022
1 parent e84d678 commit f03b884
Showing 1 changed file with 20 additions and 7 deletions.
27 changes: 20 additions & 7 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import com.bmuschko.gradle.docker.tasks.image.DockerBuildImage
import com.github.spotbugs.snom.SpotBugsTask

buildscript {
repositories {
Expand All @@ -16,7 +17,7 @@ plugins {
id 'pmd'
id 'com.diffplug.spotless' version '6.0.0'
id 'com.github.hierynomus.license' version '0.16.1'
id 'com.github.spotbugs' version '5.0.5'
id 'com.github.spotbugs' version '5.0.6'
id 'version-catalog'
id 'maven-publish'
}
Expand Down Expand Up @@ -257,6 +258,15 @@ subprojects {
cloudStorageTestTagName = 'cloud-storage'
}

spotbugs {
ignoreFailures = false
effort = 'max'
excludeFilter = rootProject.file('spotbugs-exclude-filter-file.xml')
reportLevel = 'high'
showProgress = false
toolVersion = '4.6.0'
}

test {
jacoco {
enabled = true
Expand Down Expand Up @@ -303,12 +313,7 @@ subprojects {
}
finalizedBy jacocoTestReport
}

spotbugs {
reportLevel = 'high'
excludeFilter = rootProject.file('spotbugs-exclude-filter-file.xml')
}


dependencies {
if (project.name != 'airbyte-commons') {
implementation project(':airbyte-commons')
Expand Down Expand Up @@ -369,6 +374,14 @@ subprojects {
duplicatesStrategy DuplicatesStrategy.INCLUDE
}

tasks.withType(SpotBugsTask) {
// Reports can be found under each subproject in build/spotbugs/
reports {
xml.required = false
html.required = true
}
}

javadoc.options.addStringOption('Xdoclint:none', '-quiet')
check.dependsOn 'jacocoTestCoverageVerification'
}
Expand Down

0 comments on commit f03b884

Please sign in to comment.