diff --git a/bash/tests/test-lint-yamllint-config.sh b/bash/tests/test-lint-yamllint-config.sh index 119e491..ecb097d 100755 --- a/bash/tests/test-lint-yamllint-config.sh +++ b/bash/tests/test-lint-yamllint-config.sh @@ -18,8 +18,9 @@ # comments-indentation=warning, octal-values=disabled. # # Unlike the markdownlint wrapper, this does NOT merge configs: yamllint's -c -# loads a single file, and CI (run-standards.sh:147-150) is likewise -# either/or. The assertions below encode that difference deliberately. +# loads a single file, and CI (the yamllint config block in +# run-standards.sh) is likewise either/or. The assertions below encode that +# difference deliberately. set -uo pipefail unset CDPATH @@ -103,7 +104,7 @@ fi # --------------------------------------------------------------------- # Case 2: repo config present. It must WIN over the canonical file, matching -# run-standards.sh:147-150. Asserted with a repo config that is deliberately +# CI's yamllint block. Asserted with a repo config that is deliberately # stricter than canonical — if the canonical were used instead, the finding # would not fire and this would silently pass. # --------------------------------------------------------------------- diff --git a/git/hooks/lint-yamllint.sh b/git/hooks/lint-yamllint.sh index 93fda98..5cd8a3b 100755 --- a/git/hooks/lint-yamllint.sh +++ b/git/hooks/lint-yamllint.sh @@ -1,7 +1,8 @@ #!/usr/bin/env bash # YAML lint wrapper for the `yamllint` pre-commit hook. # -# Resolves the config the way CI does (standards/run-standards.sh:147-150): +# Resolves the config the way CI does. The upstream original is the yamllint +# config block in standards/run-standards.sh, whose resolution loop reads: # # cfg="" # for c in .yamllint .yamllint.yml .yamllint.yaml; do @@ -27,9 +28,9 @@ # rather than letting yamllint choose. # # UNLIKE the markdownlint wrapper next door, this does NOT merge configs. -# yamllint's -c takes a single file, and CI's own resolution at -# run-standards.sh:147-150 is likewise either/or: the first repo-local name -# that exists wins outright, and the canonical file is used only when none do. +# yamllint's -c takes a single file, and CI's own resolution in that same +# block is likewise either/or: the first repo-local name that exists wins +# outright, and the canonical file is used only when none do. # An earlier handoff speculated this "may legitimately be a merge because # yamllint has `extends:` semantics". It is not. `extends:` is a directive # *inside* a config file, resolved by yamllint itself; it is not config diff --git a/pre-commit/config.yaml b/pre-commit/config.yaml index da83d7c..bbbf2d4 100644 --- a/pre-commit/config.yaml +++ b/pre-commit/config.yaml @@ -93,8 +93,9 @@ repos: # on any machine without dotfiles installed — stricter than the fleet's # `relaxed` base, blocking on `line-length` (error at 80 vs warning at # 120) and `indentation` (error vs warning), so local and CI disagreed - # by construction. The wrapper resolves the config exactly as - # run-standards.sh:157-161 does. See twistedmelonman/claude-config#532. + # by construction. The wrapper resolves the config exactly as the + # yamllint block in run-standards.sh does. See + # twistedmelonman/claude-config#532. - id: yamllint name: "YAML Lint (yamllint)" entry: bash -c '$HOME/.config/git/hooks/lint-yamllint.sh "$@"' -- @@ -149,9 +150,9 @@ repos: # twistedmelonman/claude-config#533. # # lint-markdown.sh merges the two instead: canonical policy as the base, - # repo keys layered on top. That matches how CI resolves config - # (github-workflows standards/run-standards.sh:193-197), so the local gate - # and standards-check agree on the rules. + # repo keys layered on top. That matches how CI resolves config (the + # markdownlint block in github-workflows standards/run-standards.sh), so + # the local gate and standards-check agree on the rules. - repo: local hooks: - id: markdownlint