mirror of
https://github.com/kevinveenbirkenbach/computer-playbook.git
synced 2026-11-28 13:57:43 +00:00
fix(lint): prune gitignored vendor trees from the project walk
The composer vendor tree lands in the repo root during the workspace suite, and the cached project walk descends it, so third-party files turn repo lints red. 8ff6b490b patched two consumers; the filename convention lint was the third.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
1 parent
35b9838238
commit
e22ba686f5
2 files changed
+3
No files matched your search
+2
@@ -80,6 +80,7 @@ class TestIterProjectFiles(_ProjectRootFixture, unittest.TestCase):
|
||||
_touch(self.root / "tests/unit/test_a.py", "import unittest")
|
||||
_touch(self.root / ".git/HEAD", "ref: refs/heads/main")
|
||||
_touch(self.root / "node_modules/pkg/index.js", "module.exports = {};")
|
||||
_touch(self.root / "vendor/nette/utils/readme.md", "# vendored")
|
||||
_touch(self.root / "__pycache__/dead.pyc", "")
|
||||
|
||||
def test_skip_dirs_pruned(self) -> None:
|
||||
@@ -90,6 +91,7 @@ class TestIterProjectFiles(_ProjectRootFixture, unittest.TestCase):
|
||||
)
|
||||
self.assertFalse(any("/__pycache__/" in p for p in all_paths))
|
||||
self.assertFalse(any("/node_modules/" in p for p in all_paths))
|
||||
self.assertFalse(any("/vendor/" in p for p in all_paths))
|
||||
|
||||
def test_extensions_filter(self) -> None:
|
||||
ymls = list(iter_project_files(extensions=(".yml",)))
|
||||
|
||||
Reference in new issue
Block a user