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
{{ message }}
Repository navigation
Read a First-Line Comment After a Byte Order Mark as Leading in Every Language #2798
bugSomething isn't workingpre-existingReview finding classed pre-existing per local-strict-review Disposing of FindingsproseA defect in rule or procedure text
A leading UTF-8 byte order mark makes the prose gate read a first-line comment as trailing in every language other than Python. extracted_comments in .github/actions/prose-gate/prose_lint.py judges a comment leading with not line[:at].strip(), and U+FEFF is not whitespace, so the comment is marked trailing. comment-added and issue-ref read leading comments only, so they drop it.
For example, a constructed tool.sh or tool.ps1 holding # See #12 for why. yields no issue-ref finding, while the same text without the mark does. A PowerShell file is the likely carrier, since Windows editors commonly add the mark.
The Python reads drop the mark themselves since the fix for #2163, at three separate sites. Dropping it once where check_file decodes the file would cover every language and could replace those three, provided no rule needs to see the mark itself.
Done
A first-line comment in a file carrying a byte order mark is read as leading in every language the gate reads, with a test per comment syntax that fails without the fix.
Found by the local strict review of the #2163 fix (handoff #2795). The finding is on code that change did not touch.
bugSomething isn't workingpre-existingReview finding classed pre-existing per local-strict-review Disposing of FindingsproseA defect in rule or procedure text
Activity
Name a Python File the Prose Gate Cannot Parse in Its Scope Line (#2797)
Read a First-Line Comment After a Byte Order Mark as Leading in Every…