Skip to content

Commit

Permalink
Disable ErrorProne's MutableConstantField check (#11283) (#11288)
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
DNVindhya committed Jun 13, 2024
1 parent 4943b4c commit 513c047
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 513c047

Please sign in to comment.