# yamllint config for nginx-cache-turbo-module -- used by ci/linter/lint-yaml.sh
# and by any editor integration, so both agree.
#
# Adopted from labs/nginx-skeleton-module at adoption step 32. Without it the
# ported checker ran on yamllint's defaults and reported 22 findings on
# arrival, none of them a bug: 161 line-length, 37 comments, 22 document-start
# and 8 truthy hits across .github/ and the generated ast-grep ruleset.
#
# GitHub Actions workflows are not hand-written prose YAML; three default rules
# fight their syntax rather than catching bugs:
#   document-start  a workflow never starts with ---, and adding one everywhere
#                   is churn with no reader benefit.
#   truthy          `on:` is the trigger key, not the boolean `on`. check-keys
#                   off keeps the rule live for VALUES (yes/no/on/off), which is
#                   where a real YAML 1.1 surprise bites.
#   line-length     inline `run:` shell and ${{ }} expressions legitimately run
#                   long. 120 as a WARNING: visible, not blocking. lint-yaml.sh
#                   deliberately does not pass --strict, so warnings do not fail
#                   the gate -- errors (real syntax/structure problems) do.
extends: default

# ci/ast-grep/ is GENERATED by tools/vendor-astgrep-rules.py and rewritten
# wholesale on every refresh, so a hand-fix there is reverted by the next vendor
# run. lib.sh already excludes rules/vendor/; rules/own/ and sgconfig.yml are
# equally generated, and their yamllint findings (long CWE message strings,
# comment indentation from the generator's own template) are upstream's to fix.
# Ignoring a tree we regenerate is not a suppression of real findings.
ignore: |
  ci/ast-grep/

rules:
  document-start: disable
  truthy:
    check-keys: false
  comments:
    min-spaces-from-content: 1
  line-length:
    max: 120
    level: warning
