diff --git a/error-prone-contrib/src/main/java/tech/picnic/errorprone/bugpatterns/RedundantStringEscape.java b/error-prone-contrib/src/main/java/tech/picnic/errorprone/bugpatterns/RedundantStringEscape.java index 6e9690f7ccb..f699c3d669e 100644 --- a/error-prone-contrib/src/main/java/tech/picnic/errorprone/bugpatterns/RedundantStringEscape.java +++ b/error-prone-contrib/src/main/java/tech/picnic/errorprone/bugpatterns/RedundantStringEscape.java @@ -17,6 +17,12 @@ import tech.picnic.errorprone.utils.SourceCode; /** A {@link BugChecker} that flags string constants with extraneous escaping. */ +// XXX: Also cover `\"` sequences inside text blocks. Note that this requires a more subtle +// approach, as double-quote characters will need to remain escaped if removing the backslash would +// create a new sequence of three or more double-quotes. (TBD whether we'd like to enforce a +// "preferred" approach to escaping, e.g. by always escaping the last of a triplet, such that the +// over-all number of escaped characters is minimized.) +// XXX: Also flag `'\"'` char literals. @AutoService(BugChecker.class) @BugPattern( summary = "Inside string expressions single quotes do not need to be escaped",