Skip to content

chore: add yamlfmt recipes for YAML indentation#403

Open
jelias2 wants to merge 1 commit into
mainfrom
jelias2/yaml-fmt-tooling
Open

chore: add yamlfmt recipes for YAML indentation#403
jelias2 wants to merge 1 commit into
mainfrom
jelias2/yaml-fmt-tooling

Conversation

@jelias2

@jelias2 jelias2 commented Jul 7, 2026

Copy link
Copy Markdown
Contributor

What

Adds YAML formatting tooling to the justfile:

  • just fmt-yaml — fix indentation in place
  • just lint-yaml — check-only (fails if anything needs formatting; suitable for CI)

Scoped to the dev/stg/prod devnet folders (missing folders are skipped). yamlfmt is managed through mise.

Indentation matches netchef

netchef's CreateNetwork PRs generate YAML with mixed indentation by file type:

File Indent
manifest.yaml 4-space
chain.yaml, dashboard/organization.yaml, everything else 2-space

So the tooling uses two configs — .yamlfmt.manifests (4-space) for manifest.yaml, .yamlfmt (2-space) for all other YAML. Verified as a no-op against netchef's raw generated output (commits 938e2b6, 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-yaml will produce a one-time normalization diff that should land as its own separate PR.

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
jelias2 force-pushed the jelias2/yaml-fmt-tooling branch from 34064d7 to 4f11826 Compare July 7, 2026 15:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant