GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | ||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | ||||||
GeezerVison is showing github.com — fix: allow braces after multiline preprocessor directives by PNHD · Pull Request #480 · cpplint/cpplint Conversation
|
|
No actionable comments were generated in the recent review.
|
| Layer / File(s) | Summary |
|---|---|
Directive continuation handling and validation cpplint.py, cpplint_unittest.py, CHANGELOG.rst |
CheckBraces follows continued lines to identify preprocessor directives. Tests cover single-line and continued directives, trailing comments, and ordinary code after directives. The changelog records the fix. |
Priority:
Estimated code review effort: 2 (Simple) | ~10 minutes
Change: Bug fix · Severity of issue fixed: Low
d3f40The brace-warning fix appears ready to merge after normal checks.
Explanation
The change satisfies issue #294. CheckBraces follows backslash continuations to the originating preprocessor directive before applying the whitespace/braces check. This suppresses the warning for a brace after a multiline OpenMP pragma. New tests cover multiline pragmas, comments, blank lines, and ordinary code that must still warn.
Explanation
The reported changes stay within issue #294. The cpplint.py change implements the required brace-check behavior. The cpplint_unittest.py cases provide regression coverage. The CHANGELOG.rst entry documents the fix. No unrelated change is shown.
Explanation
Docstring coverage is 20.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 5 functions across 2 files. (1 skipped: 1 unsupported.)
Resolution
Write docstrings for the functions missing them to satisfy the coverage threshold.
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.
Comment @coderabbitai help to get the list of available commands.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
I independently reviewed PR #480 at pinned head d3f4003 against develop (926bf4b), using GitHub-hosted Ubuntu, Windows, and macOS with Python 3.12 and 3.15.1 (pytest==9.1.1).
Full-suite comparison (consistent across all three operating systems):
Source | Python 3.12 | Python 3.15.1 -- | -- | -- Base develop | 231 passed | 227 passed, 4 failed PR #480 | 238 passed | 234 passed, 4 failedI also ran independent CheckBraces reproductions. Two- and three-line OpenMP directives produce the unwanted whitespace/braces warning on the base but not on this PR. Single-line pragmas remain unaffected, while ordinary if statements, continued if conditions, and separate if statements following pragmas still report the expected warning.
The four Python 3.15.1 failures are identical on the base and PR branches and involve the existing os.path.commonprefix() deprecation warnings. They are unrelated to this PR's changes.
One non-blocking observation: the continuation logic also exempts braces following multiline #define directives. This appears consistent with the checker's existing exemption for immediately preceding preprocessor directives, but an additional regression test could document the intended behavior.
Independent evidence:
https://github.com/Csq57/ai-python-repository-stabilization-case-study/actions/runs/40453763938
The comparison workflow passed, but the Python 3.15.1 pytest runs themselves retained their four known failures.
This review was prepared with AI assistance and grounded in actual independent CI executions.
Approved for the scoped Issue #294 fix based on the tested head.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
I checked the current merge conflict and prepared an optional merge commit on this branch, with parents Only |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
At least 1 approving review is required to merge this pull request.
There was an error while loading. Please reload this page.
Successfully merging this pull request may close these issues.
Disable whitespace/braces for blocks after multi-line OpenMP directives
There was an error while loading. Please reload this page.