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
Treat a Tool Directive Line as No Previous Sentence in the Comment Wrap Rule #2885
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
comment-wrap reports a tool directive as a sentence that wraps into the next comment line. #2828 (#2878) took TOOL_DIRECTIVE names out of comment-case, but comment_wrap_findings still keeps the directive line as the previous body, so the line after it reads as that sentence's continuation.
Constructed case, a .py file checked with --check comment-wrap --check comment-case on develop at 088afab:
# nosec B404# the next call is checked below.x=1
tool.py:1: comment-wrap: comment sentence wraps into the next line -> one sentence per line
The directive is not a sentence, so it cannot wrap. A directive placed directly above an ordinary lower-case comment has no spelling that passes, which is the same trap #2828 closed for comment-case.
Fix shape: a line is_tool_directive matches does not become the previous body in comment_wrap_findings, with a test that fails when the fix is reverted. Found by the #2828 lane, which confirmed the base behaves the same.
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
Treat a Tool Directive Line as No Previous Sentence in the Comment Wr…