fix: support root-level matching for '**/' globs

- generate an additional regex to match root-level files alongside '**/' patterns.
- ensure files in the repo root are correctly excluded from analysis.
This commit is contained in:
isExample
2025-06-26 15:26:12 +09:00
parent 2d1afc634e
commit 87a245bf9c
2 changed files with 12 additions and 3 deletions

View File

@ -92,7 +92,8 @@ class TestIgnoreFilter:
type('', (object,), {'filename': 'dir1/service.pb.go'})(),
type('', (object,), {'filename': 'dir1/dir/data_pb2.py'})(),
type('', (object,), {'filename': 'file.py'})(),
type('', (object,), {'filename': 'dir2/file_gen.go'})()
type('', (object,), {'filename': 'dir2/file_gen.go'})(),
type('', (object,), {'filename': 'file.generated.go'})()
]
expected = [
files[0],