Commit 7e4d838
fix(scan_github): skip test files before temp-write to prevent _is_test_file bypass
scan_github writes each file to a random temp path (e.g. /tmp/tmpXXX.py),
losing the original filename. The call-site checker's _is_test_file check
on call.file then always sees a non-test name and never suppresses test-file
violations. Corpus batch 25: celery/django-celery-beat had 50/54
save_without_update_fields violations in t/unit/test_*.py — all FPs.
Fix: skip test-named files in the GitHub path loop before download+extraction,
mirroring _is_test_file logic (basename test_ prefix, _test.py suffix, or
test/tests/testing directory component).
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>1 parent f935377 commit 7e4d838
2 files changed
Lines changed: 30 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
223 | 223 | | |
224 | 224 | | |
225 | 225 | | |
| 226 | + | |
| 227 | + | |
| 228 | + | |
| 229 | + | |
| 230 | + | |
| 231 | + | |
| 232 | + | |
| 233 | + | |
| 234 | + | |
| 235 | + | |
226 | 236 | | |
227 | 237 | | |
228 | 238 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
635 | 635 | | |
636 | 636 | | |
637 | 637 | | |
| 638 | + | |
| 639 | + | |
| 640 | + | |
| 641 | + | |
| 642 | + | |
| 643 | + | |
| 644 | + | |
| 645 | + | |
| 646 | + | |
| 647 | + | |
| 648 | + | |
| 649 | + | |
| 650 | + | |
| 651 | + | |
| 652 | + | |
| 653 | + | |
| 654 | + | |
| 655 | + | |
| 656 | + | |
| 657 | + | |
638 | 658 | | |
639 | 659 | | |
640 | 660 | | |
| |||
0 commit comments