|
1 | 1 | # Ruff configuration for AST-Healer |
2 | | -# https://docs.astral.sh/ruff/configuration/ |
3 | | - |
4 | 2 | target-version = "py311" |
5 | 3 | line-length = 100 |
6 | 4 |
|
7 | 5 | [lint] |
8 | | -# Enforce: pycodestyle errors (E), pyflakes (F), warnings (W) |
9 | 6 | select = ["E", "F", "W"] |
10 | 7 |
|
11 | 8 | ignore = [ |
12 | | - # Line too long — handled by formatter, not linter |
13 | | - "E501", |
14 | | - # Do not use bare `except` — acceptable in subprocess error-handling paths |
15 | | - "E722", |
16 | | - # Module level import not at top — triggered by conditional imports in main.py |
17 | | - "E402", |
18 | | - # Ambiguous variable name (e.g. `l`, `O`) — not relevant here |
19 | | - "E741", |
20 | | - # Local variable is assigned but never used — triggers on intentional _ patterns |
21 | | - "F841", |
| 9 | + "E501", # line too long — formatter concern, not linter |
| 10 | + "E722", # bare except — used intentionally in subprocess error paths |
| 11 | + "E402", # module-level import not at top — used in conftest.py intentionally |
| 12 | + "E741", # ambiguous variable name |
| 13 | + "F841", # local variable assigned but never used |
22 | 14 | ] |
23 | 15 |
|
24 | | -# Exclude auto-generated or vendored files |
25 | 16 | exclude = [ |
26 | 17 | ".git", |
27 | 18 | ".venv", |
28 | 19 | "__pycache__", |
29 | 20 | "*.egg-info", |
| 21 | + "tests/mocks", # CI stub — not production code, skip entirely |
30 | 22 | ] |
31 | 23 |
|
32 | 24 | [lint.per-file-ignores] |
33 | | -# Test files: allow unused imports (pytest fixtures, mock targets) |
34 | | -"tests/*" = ["F401", "F811"] |
35 | | -# mock_code.py contains intentional bugs — ignore all lint there |
| 25 | +# conftest imports pytest after sys.path manipulation — E402 is intentional |
| 26 | +"conftest.py" = ["E402", "F401"] |
| 27 | +# Test support files: allow unused imports and redefinitions |
| 28 | +"tests/*.py" = ["F401", "F811"] |
| 29 | +# These files contain intentional runtime bugs — skip all lint |
36 | 30 | "tests/mock_code.py" = ["E", "F", "W"] |
37 | 31 | "tests/mock_run.py" = ["E", "F", "W"] |
0 commit comments