-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy path.slop.toml
More file actions
75 lines (62 loc) · 3.3 KB
/
Copy path.slop.toml
File metadata and controls
75 lines (62 loc) · 3.3 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
# slop — dogfood config (slop linting itself, default thresholds)
root = "src"
languages = ["python"]
exclude = [
"**/_fs/**",
"**/_text/**",
"**/_ast/**",
"**/_compose/**",
"**/_structural/**",
"**/_util/**",
]
[rules.structural.hotspots]
enabled = false # new project — no meaningful churn history yet
[rules.structural.packages]
enabled = false # small corpus once the kernel subpackages are excluded; I/A/D' is noisy
[rules.structural.redundancy]
min_shared = 5 # default (3) is too noisy for test suites; raise here since tests/ share many setup helpers
[[waivers]]
id = "stutter-tests"
path = "src/tests/**"
rule = "lexical.stutter"
reason = "Test files import and call the symbols they test by name; the rule-under-test name naturally repeats tokens from the test module name (e.g. run_any_type_density inside test_any_type_density). Not a naming discipline problem."
[[waivers]]
id = "stutter-rule-wrappers"
path = "src/cli/slop/rules/**"
rule = "lexical.stutter"
reason = "Rule wrapper functions are named run_X and call X_kernel; the kernel variable name repeating the function name is the most precise choice available. This is a structural idiom of the rule registry pattern, not naming drift."
[[waivers]]
id = "stutter-engine-filters"
path = "src/cli/slop/engine.py"
rule = "lexical.stutter"
reason = "filter_rule inside _resolve_rule_filter and filter_category inside _resolve_category_filter: the local variable names the thing being resolved, which is exactly what the enclosing function is doing. Renaming would reduce clarity."
[[waivers]]
id = "stutter-compat-legacy"
path = "src/cli/slop/_compat.py"
rule = "lexical.stutter"
reason = "legacy_table inside _apply_one_legacy_table: the function applies one entry from the legacy table, so legacy_table is the precise name for what it holds."
[[waivers]]
id = "stutter-preflight"
path = "src/cli/slop/preflight.py"
rule = "lexical.stutter"
reason = "required_binaries inside check_required_binaries: the function checks required binaries, so the local variable holding the list of required binaries is named precisely."
[[waivers]]
id = "local-imports-optional-dep"
path = "src/cli/slop/_lexical/**"
rule = "structural.local_imports"
reason = "tree_sitter is an optional heavy dependency; importing at module level would crash startup for users without the wheels installed. Deferred until the kernel is actually invoked."
[[waivers]]
id = "local-imports-cli-startup"
path = "src/cli/slop/cli.py"
rule = "structural.local_imports"
reason = "CLI subcommand handlers defer imports so only the invoked command pays the import cost. Standard CLI startup-time optimisation — importing everything at the top would slow down every slop invocation."
[[waivers]]
id = "local-imports-halstead-optional"
path = "src/cli/slop/rules/halstead.py"
rule = "structural.local_imports"
reason = "identifier_token_kernel is deferred to avoid a circular import and to keep the Halstead rule loadable without the lexical kernel being initialised."
[[waivers]]
id = "local-imports-test-monkeypatch"
path = "src/tests/**"
rule = "structural.local_imports"
reason = "Imports inside test functions are required for monkeypatching: the module must be imported inside the function body so the test can patch it before the code under test runs."