chore: add yamlfmt recipes for YAML indentation#403
Open
jelias2 wants to merge 1 commit into
Open
Conversation
Add `just fmt-yaml` (fix in place) and `just lint-yaml` (check-only) recipes scoped to the dev/stg/prod devnet folders. Indentation matches netchef's generated output, which is verified to be a no-op against netchef CreateNetwork PRs: - manifest.yaml -> 4-space (.yamlfmt.manifests) - all other YAML -> 2-space (.yamlfmt) yamlfmt is managed through mise. This PR only adds tooling; it does not reformat existing files (a one-time normalization lands separately).
jelias2
force-pushed
the
jelias2/yaml-fmt-tooling
branch
from
July 7, 2026 15:15
34064d7 to
4f11826
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Adds YAML formatting tooling to the justfile:
just fmt-yaml— fix indentation in placejust lint-yaml— check-only (fails if anything needs formatting; suitable for CI)Scoped to the
dev/stg/proddevnet folders (missing folders are skipped).yamlfmtis managed throughmise.Indentation matches netchef
netchef's
CreateNetworkPRs generate YAML with mixed indentation by file type:manifest.yamlchain.yaml,dashboard/organization.yaml, everything elseSo the tooling uses two configs —
.yamlfmt.manifests(4-space) formanifest.yaml,.yamlfmt(2-space) for all other YAML. Verified as a no-op against netchef's raw generated output (commits938e2b6,cb38f36), so netchef automation PRs won't trip the linter.Note
This PR only adds tooling — it does not reformat existing files. The repo currently has inconsistent indentation across devnets (e.g. some inventories are 4-space, some 2-space). Running
just fmt-yamlwill produce a one-time normalization diff that should land as its own separate PR.