Skip to content

Commit

Permalink
Disable ErrorProne's MutableConstantField check (#11283)
Browse files Browse the repository at this point in the history
It is simultaneously overly zealous and doesn't notice basic cases. As
noticed in #11281.
  • Loading branch information
ejona86 authored Jun 12, 2024
1 parent 5322414 commit a4ef771
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -253,12 +253,24 @@ subprojects {
options.errorprone.check("JavaUtilDate", CheckSeverity.OFF)
// The warning fails to provide a source location
options.errorprone.check("MissingSummary", CheckSeverity.OFF)

// This check is in libs.errorprone.corejava8 but has been removed
// in later versions. It isn't smart enough to realize the field is
// actually immutable. And it also doesn't complain about arrays
// that are actually mutable.
options.errorprone.check("MutableConstantField", CheckSeverity.OFF)
}
tasks.named("compileTestJava").configure {
// LinkedList doesn't hurt much in tests and has lots of usages
options.errorprone.check("JdkObsolete", CheckSeverity.OFF)
options.errorprone.check("PreferJavaTimeOverload", CheckSeverity.OFF)
options.errorprone.check("JavaUtilDate", CheckSeverity.OFF)

// This check is in libs.errorprone.corejava8 but has been removed
// in later versions. It isn't smart enough to realize the field is
// actually immutable. And it also doesn't complain about arrays
// that are actually mutable.
options.errorprone.check("MutableConstantField", CheckSeverity.OFF)
}

plugins.withId("ru.vyarus.animalsniffer") {
Expand Down

0 comments on commit a4ef771

Please # to comment.