Repository navigation
Expand file tree
/
Copy pathpoly.toml
More file actions
243 lines (227 loc) · 9.05 KB
/
Copy pathpoly.toml
File metadata and controls
243 lines (227 loc) · 9.05 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
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
required_version = ">=0.36.0"
[discovery]
exclude = [
# Vendored helpers are checked against pinned upstream bytes, so formatting must not rewrite them. ~keep
"/tests/lib/xberg-bats/**",
# toolchains.py sync writes these and its check compares them byte for byte; formatting would re-indent
# the script with tabs and the uncomment pass would strip the generated header. ~keep
"/mise-tasks/shared.toml",
"/mise-tasks/.shared/**",
# ai-rulez verifies generated bytes; formatting these manifests would invalidate provenance. ~keep
"/plugin/plugin.json",
"/plugin/mcp.json",
"/plugin/.pi/**",
"/plugin/.claude-plugin/**",
"/plugin/.codex-plugin/**",
"/plugin/.cursor-plugin/**",
"/plugin/.factory-plugin/**",
"/plugin/.opencode/**",
"/plugin/.hermes/**",
"/plugin/skills/**",
"/plugin/.mcp.json",
"/plugin/gemini-extension.json",
"/plugin/kimi.plugin.json",
"/plugin/package.json",
"/plugin/.ai-rulez-generated.json",
"/.claude-plugin/marketplace.json",
"/.agents/plugins/marketplace.json",
"/.ai-rulez-generated.json",
"**/*.lock",
"**/*.onnx",
# Brand/asset SVGs are hand-tuned; poly must not reflow them. ~keep
"**/*.svg",
"dist/**",
"**/assets/**",
"**/tests/data/**",
# test_documents is a git submodule (a separate shared corpus repo) whose files are
# deliberately malformed extraction fixtures. poly must never rewrite them. ~keep
"test_documents/**",
"**/pnpm-lock.yaml",
"/skills/**",
# adrlint owns ADR Markdown with its own rumdl config and content-hash lock; poly would
# double-report and its lock-unaware formatter would break locks. ~keep
"/adrs/**",
]
[engines.rumdl.lang.markdown.lint]
disable = ["MD025", "MD012", "MD013", "MD024", "MD033", "MD036", "MD041", "MD046", "MD051", "MD076"]
[engines.rumdl.lang.markdown.format]
# MD025 stays enabled for lint but disabled for fmt: rumdl's autofix for a second
# level-1 heading demotes every heading that follows it, which silently reparents a
# whole CHANGELOG under [Unreleased] and breaks release-note extraction. ~keep
disable = ["MD012", "MD013", "MD024", "MD033", "MD036", "MD041", "MD046", "MD051", "MD076", "MD025"]
[engines.shfmt.format]
enabled = true
use_tabs = true
[engines.typos]
# typos is opt-in in poly v2; this keeps the v1 default (on). ~keep
enabled = true
[engines.uncomment]
enabled = true
code_only = false
preserve_patterns = [
# mise reads file-task metadata from #MISE and #USAGE comments. ~keep
"MISE ",
"USAGE ",
"SAFETY",
"HACK",
"WORKAROUND",
"NOTE",
"Copyright",
"Licensed",
"License",
"SPDX",
"Apache",
"MIT",
"WITHOUT WARRANTIES",
"limitations under the License",
"copyright",
"licensed",
"license",
"apache",
"you may not use this file except in compliance",
"You may obtain a copy of the License",
"you may obtain a copy of the license",
"Unless required by applicable law",
"unless required by applicable law",
"distributed under the License",
"distributed under the license",
"AS IS",
"as is",
"without warranties",
"specific language governing permissions",
"limitations under the license",
]
[tools.actionlint]
enabled = true
[per_file_ignores]
# astro:content is an Astro virtual module typed by generated .astro/ files, which are not committed. ~keep
"docs-site/src/content.config.ts" = ["TS2307"]
# Quality metrics do not apply to test code. A test function's length is its assertion
# count and a table-driven test's arity mirrors its cases; splitting either to satisfy a
# production-code maintainability metric makes the test harder to read, not easier. Only
# `file-too-long` and `type-too-long` still apply here -- an oversized test FILE is a real
# organisational problem, unlike an oversized test function. ~keep
"**/tests/**/*" = ["cyclomatic-complexity", "function-too-long", "nesting-too-deep", "too-many-parameters"]
"**/test/**/*" = ["cyclomatic-complexity", "function-too-long", "nesting-too-deep", "too-many-parameters"]
"**/benches/**/*" = ["cyclomatic-complexity", "function-too-long", "nesting-too-deep", "too-many-parameters"]
"**/*_test.rs" = ["cyclomatic-complexity", "function-too-long", "nesting-too-deep", "too-many-parameters"]
"**/*_tests.rs" = ["cyclomatic-complexity", "function-too-long", "nesting-too-deep", "too-many-parameters"]
"**/test_*.py" = ["cyclomatic-complexity", "function-too-long", "nesting-too-deep", "too-many-parameters"]
"**/*_test.py" = ["cyclomatic-complexity", "function-too-long", "nesting-too-deep", "too-many-parameters"]
"**/conftest.py" = ["cyclomatic-complexity", "function-too-long", "nesting-too-deep", "too-many-parameters"]
"**/*.test.ts" = ["cyclomatic-complexity", "function-too-long", "nesting-too-deep", "too-many-parameters"]
"**/*.test.js" = ["cyclomatic-complexity", "function-too-long", "nesting-too-deep", "too-many-parameters"]
"**/*.test.mjs" = ["cyclomatic-complexity", "function-too-long", "nesting-too-deep", "too-many-parameters"]
"**/*.spec.ts" = ["cyclomatic-complexity", "function-too-long", "nesting-too-deep", "too-many-parameters"]
"**/*.spec.js" = ["cyclomatic-complexity", "function-too-long", "nesting-too-deep", "too-many-parameters"]
# Stylistic rules disabled repo-wide. Each is a formatting or idiom preference with no
# correctness or security consequence, and each fires in volumes no one can hand-maintain
# (`require-unicode-regexp` alone was 724 across the polyrepo, `no-inline-comments` 200).
# `eqeqeq` is here for a stronger reason: every occurrence audited was the deliberate
# `== null` nullish idiom, so the rule had a 100% false-positive rate here.
# Rules with a real correctness or security angle are deliberately NOT listed and stay on:
# unicorn/require-post-message-target-origin, unicorn/no-array-callback-reference,
# unicorn/no-immediate-mutation, unicorn/no-array-fill-with-reference-type. ~keep
"**" = [
"CPY001",
"UnorderedKey",
"eqeqeq",
"no-inline-comments",
"no-negated-condition",
"require-unicode-regexp",
"unicorn/consistent-function-scoping",
"unicorn/escape-case",
"unicorn/explicit-length-check",
"unicorn/new-for-builtins",
"unicorn/no-array-sort",
"unicorn/no-hex-escape",
"unicorn/no-lonely-if",
"unicorn/no-negated-condition",
"unicorn/no-typeof-undefined",
"unicorn/no-useless-undefined",
"unicorn/prefer-add-event-listener",
"unicorn/prefer-at",
"unicorn/prefer-code-point",
"unicorn/prefer-dom-node-append",
"unicorn/prefer-dom-node-remove",
"unicorn/prefer-import-meta-properties",
"unicorn/prefer-native-coercion-functions",
"unicorn/prefer-number-coercion",
"unicorn/prefer-query-selector",
"unicorn/prefer-single-call",
"unicorn/prefer-string-replace-all",
"unicorn/prefer-string-slice",
"unicorn/prefer-top-level-await",
"unicorn/prefer-type-error",
"unicorn/require-module-specifiers",
]
"basemind.toml" = ["comment", "doc-comment"]
# Python uses `#` comments idiomatically; the uncomment hook targets Rust/TOML. ~keep
"python/**" = ["comment", "doc-comment"]
# T201 (`print` found): every module below is an argparse CLI entry point run as
# `python -m sceptre_rs_tools.<name>`, and its stdout/stderr writing IS the product —
# the aggregated Markdown table, the export summary, the drift-check verdict, the
# per-batch progress. The package installs no logging subscriber and has no logger to
# route through, so `print` is the output channel, not a stray debugging statement.
# Library modules in the same package (corpus, stats, text_metrics) are deliberately
# NOT listed and keep T201 on. ~keep
"python/sceptre_rs_tools/backend_matrix.py" = ["T201"]
"python/sceptre_rs_tools/benchmark.py" = [
"C901",
"PLR0912",
"PLR0913",
"PLR0915",
"PLR0917",
"T201",
"file-too-long",
"function-too-long",
]
"python/sceptre_rs_tools/export.py" = ["T201"]
"python/sceptre_rs_tools/golden.py" = ["T201"]
"python/sceptre_rs_tools/publish.py" = ["T201"]
"python/sceptre_rs_tools/rasterize.py" = ["T201"]
# The docs site is JS/CSS/MDX; comments there are idiomatic, not stray Rust/TOML cruft. ~keep
"docs-site/**" = ["comment", "doc-comment"]
[hooks]
stages = ["pre-commit"]
[hooks.builtin]
# lint, fmt and file_safety inherit [discovery] exclude. ~keep
lint = true
fmt = true
commit = { stages = ["commit-msg"] }
file_safety = true
cargo = true
[hooks.pre-commit.commands.pyrefly]
run = "bash scripts/typecheck.sh"
workspace = true
files = "{python/**,scripts/**,pyproject.toml,uv.lock,mise.toml,poly.toml}"
[[hooks.sources]]
id = "ai-rulez"
git = "https://github.com/Goldziher/ai-rulez.git"
revision = "v5"
hooks = ["ai-rulez-validate", "ai-rulez-plugin-verify"]
[[hooks.sources]]
id = "adrlint"
git = "https://github.com/Goldziher/adrlint.git"
revision = "v0"
hooks = ["adrlint-lint", "adrlint-format-check", "adrlint-lock-check"]
[engines.skif]
enabled = true
dir = "docs-site"
[engines.tsrs]
enabled = true
dir = "docs-site"
[engines.harper]
enabled = true
# Off: rules that contradict the org's sentence-case headings and no-Oxford-comma style, or misread technical prose
# (denylist, MB, stdin). ~keep
ignore = [
"UseTitleCase",
"OxfordComma",
"SplitWords",
"OrthographicConsistency",
"ExpandMemoryShorthands",
"ExpandStandardInputAndOutput",
"ExpandConfiguration",
"ExpandMinimum",
]