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
A lower-case tool directive the prose gate exempts from comment-added still draws comment-case #2828
bugSomething isn't workinggateA rule with no mechanical check, or a check that misses a shapepre-existingReview finding classed pre-existing per local-strict-review Disposing of Findings
A tool directive that TOOL_DIRECTIVE exempts from comment-added still draws comment-case in a .py file when the directive opens in lower case and its body carries no key: shape that another exemption reads. TOOL_DIRECTIVE is read by comment-added alone, and the comment above it says so deliberately: "Read by comment-added alone rather than added to NOT_PROSE, which two gating rules share." So comment-case judges these directives as sentences.
Constructed cases, checked with check_file and the three comment rules on the develop head that carries #2827:
# nopep8 in tool.py -> comment-case
# nosec B404 in tool.py -> comment-case
# nopep8: E501 in tool.py -> no finding
x = 1 # nopep8 in tool.py -> no finding (the trailing form is cut)
A tool that reads its directive only in lower case leaves no spelling that passes comment-case, and deleting or rewording the directive changes what the file does. pycodestyle reads nopep8 in any case, so # NOPEP8 passes once #2827 merges, but nosec and hadolint have no such escape that has been verified.
Raised by the Copilot round on #2827 as "nopep8 must also be added to NOT_PROSE to prevent comment-case findings". This is pre-existing behavior rather than something #2827 introduced, since NOT_PROSE never listed nopep8 and the lower-case # nopep8 drew comment-case before that change as well. It applies to every TOOL_DIRECTIVE name, so it is filed as one class rather than fixed for nopep8 alone.
Whether these names should leave comment-case as well, or the narrow exemption should stand with the label as the remedy, turns on the design note above, so the fix is a choice between those two rather than a determined outcome.
Maintainer decision (2026-10-12): TOOL_DIRECTIVE names leave comment-case as well. comment-case reads TOOL_DIRECTIVE itself, and the names are not added to the shared NOT_PROSE.
bugSomething isn't workinggateA rule with no mechanical check, or a check that misses a shapepre-existingReview finding classed pre-existing per local-strict-review Disposing of Findings
Activity
ptr727 commentedon Oct 12, 2026
Maintainer decision (2026-10-12):
TOOL_DIRECTIVEnames leavecomment-caseas well.comment-casereadsTOOL_DIRECTIVEitself, and the names are not added to the sharedNOT_PROSE.Exempt Tool Directive Names From the Comment Case Rule (#2878)
Promote Five Develop Fixes for Tool Directives, Prose Tests, Review B…
Treat a Tool Directive Line as No Previous Sentence in the Comment Wr…