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
# ~keep poly configuration for validating *generated* code.
#
# Deliberately separate from the repository's own poly.toml. That file governs
# scythe's hand-written source; this one governs the output scythe emits, and
# the two disagree on purpose:
#
# * `target_version` is py310, not py312. Generated Python is documented as
# supporting 3.10+ (see the python-conventions rules and the `python3.10`
# floor in every python-* backend manifest), so linting it against 3.12
# would accept syntax the supported floor cannot run.
# * `line_length` is generous. Generated code is not written for humans to
# hand-edit; the provenance header alone exceeds ruff's 88-column default,
# which is why it carries `# noqa: E501`. Wrapping decisions belong to the
# backends and to `scythe fmt`, not to a linter run over their output.
# * Two mago rules are ignored for PHP because they are structurally
# inapplicable to this output rather than merely inconvenient:
# `single-class-per-file` — a generated PHP file is one module holding the
# enum, the composite classes, every row class and `Queries`, which is the
# documented shape, not an accident — and `excessive-parameter-list`, since
# a row struct's promoted constructor takes exactly one parameter per
# selected column, so the user's schema decides the count and no backend
# choice can change it. Note this means a consumer running mago over
# scythe's PHP output with default rules will see both; that belongs in the
# PHP guide, not in a suppression here.
#
# Passed explicitly via `--config` from `validation.rs::poly_check`. Without it
# poly would resolve config by walking up from the temporary file it is handed,
# find nothing outside the repository, and silently use its built-in defaults --
# so what CI enforced would depend on where the temp directory happened to be.
[]
= 200
= "lf"
[]
= "py310"
= 200
[]
= ["single-class-per-file", "excessive-parameter-list"]