You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
strip_strings() treats a backslash as an escape inside every quoted span. In a C# verbatim string (@"...") the backslash is literal, so a verbatim string ending in one consumes its own closing quote, the masker never leaves the string, and the rest of the line is blanked:
LINE : var p = @"C:\tmp\"; // Two things. Here.
MASK : var p = @"
EXTR : []
The trailing comment is invisible to extracted_comments(), so every comment rule goes blind on that line.
Line-scoped.strip_strings() resets its quote state per line, so a broken line cannot corrupt the lines below it.
Warn-only today.comment-wrap and comment-case report without gating, and charset plus dupword are what gate, so nothing fails CI because of this.
C# only. No other fleet syntax has a verbatim-string form.
The related half
The verbatim escape for a quote is a doubled "", not \". The masker reads the first as closing and the second as reopening, so @"say ""hi"" now" is mis-paired even without a trailing backslash.
Fix sketch
Recognize the @" opener and mask to the next unpaired ", treating "" as a literal quote and the backslash as an ordinary character. The syntax table would need to say that C-like covers a language with verbatim strings, since the masker is currently language-agnostic within C_LIKE and .js, .ts, .json, and .jsonc share that entry while having no verbatim form.
Wanting a case in test_prose_lint.py covering @"C:\tmp\" with a trailing comment, watched failing first.
Found by Copilot in the low-confidence block of its review of promotion PR #460, and deferred there rather than expanding that promotion.
strip_strings()treats a backslash as an escape inside every quoted span. In a C# verbatim string (@"...") the backslash is literal, so a verbatim string ending in one consumes its own closing quote, the masker never leaves the string, and the rest of the line is blanked:The trailing comment is invisible to
extracted_comments(), so every comment rule goes blind on that line.Scope
strip_strings()resets its quote state per line, so a broken line cannot corrupt the lines below it.comment-wrapandcomment-casereport without gating, andcharsetplusdupwordare what gate, so nothing fails CI because of this.The related half
The verbatim escape for a quote is a doubled
"", not\". The masker reads the first as closing and the second as reopening, so@"say ""hi"" now"is mis-paired even without a trailing backslash.Fix sketch
Recognize the
@"opener and mask to the next unpaired", treating""as a literal quote and the backslash as an ordinary character. The syntax table would need to say that C-like covers a language with verbatim strings, since the masker is currently language-agnostic withinC_LIKEand.js,.ts,.json, and.jsoncshare that entry while having no verbatim form.Wanting a case in
test_prose_lint.pycovering@"C:\tmp\"with a trailing comment, watched failing first.Found by Copilot in the low-confidence block of its review of promotion PR #460, and deferred there rather than expanding that promotion.