scythe-codegen 0.21.0

Polyglot code generation backends for scythe
Documentation
# ~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 py311, not py312. Generated Python is documented as
#     supporting 3.11+ (see the python-conventions rules), 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.
#   * ruff's UP042 is ignored. It asks for `StrEnum` in place of `str, Enum`,
#     but `StrEnum` changes `str()` and `format()` of a member from
#     `Status.ACTIVE` to `active`, so switching would change runtime behavior
#     of generated code; the backends keep `str, Enum` deliberately.
#   * 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.

[defaults]
line_length = 200
line_ending = "lf"

[lint.python.ruff]
target_version = "py311"
line_length = 200
ignore = ["UP042"]

[lint.php.mago]
ignore = ["single-class-per-file", "excessive-parameter-list"]