Skip to content

Fix NOLINT parsing bug#7118

Closed
Chessing234 wants to merge 2 commits into
BVLC:masterfrom
Chessing234:fix/cpplint-nolint-regex
Closed

Fix NOLINT parsing bug#7118
Chessing234 wants to merge 2 commits into
BVLC:masterfrom
Chessing234:fix/cpplint-nolint-regex

Conversation

@Chessing234
Copy link
Copy Markdown

Bug: NOLINT( without a closing parenthesis is misparsed as NOLINT(*).
Root cause: The regex \bNOLINT(_NEXT_LINE)?\b(\([^)]*\))? uses an optional capturing group for the parenthesis block. When the closing parenthesis is missing, the optional group fails to match, but since it is optional, the overall match succeeds with group(2) as None. This causes the script to treat it as a blanket NOLINT suppression.
Why fix is correct: By making the closing parenthesis itself optional inside the capturing group ((\([^)]*\)?)?), a malformed NOLINT( successfully populates group(2) with (. The subsequent logic then correctly processes it as an unrecognized category instead of suppressing all lint errors.

Chessing234 and others added 2 commits May 27, 2026 13:39
After ShareData/ShareDiff, stale capacity_ can cause Reshape to skip
reallocation while pointing at shared memory incorrectly.

Co-authored-by: Cursor <cursoragent@cursor.com>
@Chessing234 Chessing234 closed this by deleting the head repository May 29, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant