Skip to content

Commit 935dc03

Browse files
committed
use different approach to disabling nullaway
1 parent ecc5f3e commit 935dc03

File tree

1 file changed

+6
-10
lines changed

1 file changed

+6
-10
lines changed

conventions/src/main/kotlin/otel.nullaway-conventions.gradle.kts

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -18,20 +18,16 @@ nullaway {
1818

1919
tasks {
2020
withType<JavaCompile>().configureEach {
21-
if (name.contains("test", ignoreCase = true)) {
22-
// For test compilation tasks, disable errorprone entirely to avoid nullaway issues
23-
options.errorprone {
24-
isEnabled.set(false)
25-
}
26-
} else {
27-
options.errorprone.nullaway {
28-
severity.set(CheckSeverity.ERROR)
29-
}
30-
}
3121
options.errorprone.nullaway {
22+
if (name.contains("test", ignoreCase = true)) {
23+
disable()
24+
} else {
25+
error()
26+
}
3227
customInitializerAnnotations.add("org.openjdk.jmh.annotations.Setup")
3328
excludedFieldAnnotations.add("org.mockito.Mock")
3429
excludedFieldAnnotations.add("org.mockito.InjectMocks")
3530
}
3631
}
3732
}
33+

0 commit comments

Comments
 (0)