Skip to content

false FormatStringAnnotation errors after one unrelated legit error #1841

Open
@eraneverlaw

Description

@eraneverlaw

Description of the problem / feature request:

We have encountered a problem a couple of different times: After getting a legit error, such as UnusedVariable, a flood of non related errors are emitted, but they are all false positives. After fixing the first one, they go away. Note that they are in other files, and usually the compilation stops after the first file in error, so that is weird in this case.

The false errors all seem to be (those variables ARE effectively final) :
error: [FormatStringAnnotation] All variables passed as @FormatString must be final or effectively final [ERROR] (see https://errorprone.info/bugpattern/FormatStringAnnotation)

Looking at the code generating this error, seems like the flags are not set correctly for some reason:
image

Feature requests: what underlying problem are you trying to solve with this feature?

Those false errors are quite startling, so ideally they should no longer appear.

Bugs: what's the simplest, easiest way to reproduce this bug? Please provide a minimal example if possible.

I really don't know what a minimal thing to reproduce it would be.

What version of Error Prone are you using?

2.4.0

Have you found anything relevant by searching the web?

No.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions