Skip to content

Support String.formatted with FormatString Bug Pattern #2726

Description

@codylerum

Added in JDK 15 is the ability for callformatted on a String.

https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/String.html#formatted(java.lang.Object...)

"foo %s".formatted("bar");

It would be great if the https://errorprone.info/bugpattern/FormatString check was enforced on this.

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