Skip to content

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

@krisso-rtb

Description

@krisso-rtb

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 #4699.
In ErrorProneAnalyzer a few suspicious changes were made, especially around emptiness of namedCheckers variable.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions