Repository navigation
Expand file tree
/
Copy pathruff.toml
More file actions
64 lines (59 loc) · 2.7 KB
/
Copy pathruff.toml
File metadata and controls
64 lines (59 loc) · 2.7 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
# THIS GATE IS CODE QUALITY ONLY. It must never change prompt text.
#
# Prompts are the product. Do NOT select any rule that can rewrite the contents
# of a string literal - ISC (implicit concat), Q (quote style), UP032 (f-string
# conversion), COM, W291/W293, and the D docstring family all can. The current
# select touches control flow, names, and imports; it never edits prose.
#
# Ruff 0.16 enables 413 rules by default (up from 59). We do not take that set:
# flowctl is a 33k-LOC single file with deliberate fail-open error handling, and
# a wholesale style sweep would be churn. This select is correctness-only -
# undefined names, real bug patterns, security. Style rules are out of scope on
# purpose; add one only when it has caught a real defect.
#
# Pin the version in CI. Ruff's default set moves between minor releases.
target-version = "py311"
exclude = [
# Project state, not source: specs, tasks, memory, receipts, artifacts, and
# agent scratch under .flow/tmp. Nothing here is authored as shipped code, so
# a lint verdict on it is noise. Never let --fix write into it.
".flow",
# Generated by scripts/sync-codex.sh; fixes here are overwritten on next sync.
"plugins/flow-next/codex",
# Deliberate stubs. Broken-on-purpose is the point.
"plugins/flow-next/tests/fixtures",
# Throwaway eval harnesses, not shipped.
"optimization",
# Other agents' working trees.
".worktrees",
".claude",
]
[lint]
select = [
"F", # pyflakes: undefined names, unused imports, shadowing
"E9", # syntax / IO errors
"PLE", # pylint errors
"B", # bugbear
"RUF013", # implicit Optional
"RUF034", # useless if-else
"PLR0124", # comparison with itself
"S102", # exec
"S307", # eval
"PIE810", # multiple startswith/endswith
]
# Deliberately NOT selected:
# BLE001 - 44 blind excepts. flowctl fails open by design; this is
# architecture, not debt. Audit them by hand, not by gate.
# (One of them hid the NameError fixed in the previous commit, so
# the audit is worth doing - just not as a blocking gate.)
# PLW1510 - 85 subprocess.run without check=. Almost all intentional.
# ISC004 - catches missing commas in collections, which is a real bug class,
# but all 8 hits here were deliberate multi-line wrapping. Zero
# signal, 8 reformats. Revisit if a missing comma ever ships.
# TRY004 - would swap ValueError for TypeError at 4 sites. That is an API
# change to callers and their tests, not a lint fix. Out of scope
# for a chore PR; worth its own look.
# UP/I/SIM - style. See the header.
[lint.per-file-ignores]
# unittest idioms
"plugins/flow-next/tests/*" = ["B011", "B017"]