Repository navigation
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Advanced Run ID: 📒 Files selected for processing (1)
Included review availability: Your plan provides up to 4 included reviews per hour; 3 remain after this review. 📝 WalkthroughWalkthroughThe ChangesInclude-subdirectory behavior
Priority: ⬇️ Low Estimated code review effort: 2 (Simple) | ~10 minutes Change: Bug fix · Severity of issue fixed: Low Suggested reviewers: Merge Risk: ⚪ Minimal · up to No concrete correctness or merge-blocking risk remains for this focused change. 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
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 |
walidbi200
left a comment
There was a problem hiding this comment.
Reviewed current head 1592d0b. The normal #375 case is fixed and the tests are green, but I found two path-handling cases that seem important to fix before merging.
One is a source path that goes through a symlink and then ... In that case cpplint can open one real file, while FileInfo.FullName() normalizes the path to a different lexical directory. The new same-directory header check can then look beside the wrong path. I reproduced both outcomes: it can warn even when the real sibling header exists, and it can suppress the warning when only an unrelated header exists in the normalized directory.
The other case is self-includes through filesystem aliases. If self.h includes alias.h and alias.h is a symlink or hard link to self.h, develop still reports build/include_subdir, but this PR suppresses it. os.path.samefile() confirms the two paths refer to the same file. The current normpath() / normcase() comparison only compares path strings, so it doesn't catch that identity case.
I also checked the ordinary same-directory behavior, missing headers, the sample-output changes, and the full test suite; those parts look good. I think these two filesystem cases should get regression tests and a fix before merge.
walidbi200
left a comment
There was a problem hiding this comment.
Re-reviewed current head d160830. Both findings from my previous review are fixed: I reproduced the symlink+.. false positive/false negative and both alias suppressions on 1592d0b, and all four behave correctly on this head.
The realpath/samefile change is narrowly scoped, the new regression tests fail without the corresponding fixes, and I also checked normal same-directory includes, self-includes, missing and invalid paths, symlinked sources, broken symlinks, and the fallback path handling without finding a new correctness issue.
Focused and full suites pass locally (236 tests, 96.48% coverage), along with pylint, mypy, pre-commit, and git diff --check.
No remaining blocker from me on this head. LGTM.
Fixes #375.
Summary
build/include_subdirbuild/include_subdirenforcement when the bare header does not resolve locally, and keep self-includes subject to the existing warningTesting
src/main.cpp+src/utils.hppfalse positive from False positive for top-level header #375pytest --no-cov cpplint_unittest.py -k testBuildInclude: passed after the fixpylint cpplint.py: passedSummary by CodeRabbit
Bug Fixes
Documentation