fix: Exclude .tox from separation of concerns check#438
Conversation
Co-authored-by: Cursor <cursoragent@cursor.com>
📝 WalkthroughWalkthroughThis PR updates the repository assessment tool to skip ChangesTox directory exclusion
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
✨ Simplify code
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 |
📉 Test Coverage Report
Coverage calculated from unit tests only |
jwm4
left a comment
There was a problem hiding this comment.
Review by Bill Murdock (with assistance from Claude Code)
Verdict: Approve
The fix is correct and well-scoped. .tox directories (created by the tox testing framework, full of virtualenvs and test artifacts) were being scanned by the SeparationOfConcernsAssessor, causing massive false positives. Adding .tox to the exclusion list in both _check_file_cohesion() and _check_module_naming() is the right fix.
Minor suggestions (non-blocking)
-
Consider adding
.noxtoo. The nox testing framework is directly analogous to tox and creates a.nox/directory with the same kind of temporary virtualenvs. Adding it now would prevent the same bug report from a nox user. Could be done here or as a follow-up. -
DRY opportunity (pre-existing). The exclusion list is duplicated in both methods. A class-level constant like
_SKIP_DIRS = {".venv", "venv", "node_modules", ".git", ".tox"}would prevent them from drifting apart. Not introduced by this PR, just a nice-to-have. -
No test added. Not a blocker for a one-line exclusion fix, but a unit test asserting that paths containing
.toxare filtered out would guard against regressions.
Nice contribution, thanks!
|
Let me know if you plan to make any more changes. If not, I will merge as is. |
Description
Similar as .venv, .tox contains only temporary files which are not part of the project - not excluding this directory leads to false negative in Separation of Concerns check.
Type of Change
Changes Made
.toxto `src/agentready/assessors/structure.pyTesting
Ran against local project with
.tox- separation_of_concerns check passed after the change (original report:File cohesion: 9346/59348 files >500 lines)pytest)Checklist
Summary by CodeRabbit
.toxdirectories from code quality analysis, preventing false positives in test environment files.