Skip to content

@SuppressWarnings("InlineFormatString") doesn't work #1650

@anthonyvdotbe

Description

@anthonyvdotbe

Description of the problem / feature request:

I'm unable to suppress InlineFormatString, neither by annotating the constant, nor by annotating the method that uses the constant.

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

class Foo {

    @SuppressWarnings("InlineFormatString")
    private static final String FMT = "%s";

    @SuppressWarnings("InlineFormatString")
    String foo() {
        return String.format(FMT, "bar");
    }

}

What version of Error Prone are you using?

2.4.0

Have you found anything relevant by searching the web?

No.

Metadata

Metadata

Assignees

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