Cursor Bugbot flagged this on PR RevylAI/greenlight#36 (commit 8c9aee1):
extractStringLiterals treated every quote byte as a delimiter with no
escape handling, so a backslash-escaped quote inside a literal (e.g. the
contraction in 'it\'s not available on android yet') closed the literal
early. Everything after the escaped quote fell outside any extracted
literal, so literalPatterns-based rules like platform-reference silently
missed real competitor mentions in that text.
Fixed by treating a backslash followed by any character as an escape
sequence while inside a string: both bytes are kept as literal content
and skipped over, so the following quote can't be mistaken for the
closing delimiter.
Verified by building before/after binaries and running codescan against
a real repro file containing an escaped apostrophe followed by "android":
the pre-fix binary produced zero platform-reference findings (bug
reproduced), the post-fix binary correctly flagged it. Re-checked the
existing bare-identifier-between-literals false positive case (still
correctly suppressed) and a plain true-positive case (still correctly
flagged) with no regression. go build/vet/test -count=1 ./.../gofmt -l
all clean.