error-prone icon indicating copy to clipboard operation
error-prone copied to clipboard

[v2.37.0] Disabled checks are executed when XepPatchChecks: is empty

Open kbarczynski-rtbh opened this issue 10 months ago • 1 comments

While upgrading ErrorProne from 2.36 to 2.37 we observed checks defined in

com.google.errorprone.scanner.BuiltInCheckerSuppliers.DISABLED_CHECKS

are surprisingly fired. Our maven-compiler-plugin has config:

<arg>
    -Xplugin:ErrorProne \
    -XepPatchLocation:IN_PLACE \
    -XepPatchChecks:${errorprone.patchChecks} \
    -XepDisableAllChecks \
    -Xep:NullAway:ERROR \
    <!-- and our custom checkers: -->

where errorprone.patchChecks is a dynamically-provided Maven param. When it's empty we have effectively:

    -XepPatchLocation:IN_PLACE \
    -XepPatchChecks: \
   ...

and tons of unwanted checks are executed, e.g. BooleanParameter or UnnecessarilyFullyQualified.

When we remove these two lines it's fine.

The issue does NOT exist in 2.36.


It might be added by https://github.com/google/error-prone/pull/4699. In ErrorProneAnalyzer a few suspicious changes were made, especially around emptiness of namedCheckers variable.

kbarczynski-rtbh avatar Mar 26 '25 21:03 kbarczynski-rtbh

I filed #5102; would love to receive feedback on whether this fixes the issue for you.

Stephan202 avatar Jun 14 '25 11:06 Stephan202

I filed #5102; would love to receive feedback on whether this fixes the issue for you.

Thanks! It seems to work fine 👍

kbarczynski-rtbh avatar Nov 07 '25 08:11 kbarczynski-rtbh