Skip to content

chore: lint YAML and GitHub Actions workflows - #122

Draft
iloveitaly wants to merge 6 commits into
masterfrom
cursor/add-yaml-action-linters-6a77
Draft

iloveitaly wants to merge 6 commits into
masterfrom
cursor/add-yaml-action-linters-6a77

Conversation

@iloveitaly

@iloveitaly iloveitaly commented Sep 26, 2026 •

Copy link
Copy Markdown
Owner

Motivation

YAML files and GitHub Actions workflows were not part of the lint run. Invalid YAML and workflow mistakes only showed up when Actions executed them.

Description

  • Install yamllint and actionlint with the other dev tools in .config/mise.dev.toml, and lock them so CI installs the same versions (yamllint 1.38.0, actionlint 1.7.12).
  • Run both from just dev_lint. just lint and the Backend CI job already call that recipe. The pre-push hook now runs it too.
  • .config/lint/yamllint.yml keeps structural checks (duplicate keys, indentation, trailing spaces) and skips rules that fight this repo: a required --- document start, an 80-column line limit, and treating the GitHub Actions on: key as a boolean. just dev_lint passes that file with --config-file. Generated web/pnpm-lock.yaml, node_modules/, .venv/, tmp/, and lefthook-local.yml are ignored. #cloud-config is exempt from the comment-spacing rule because cloud-init requires that exact first line.
  • .config/lint/actionlint.yml allows the deploy job's intentional if: false. just dev_lint passes it with --config-file. Shellcheck and pyflakes stay disabled so local runs match CI; GitHub-hosted runners ship shellcheck and this toolchain does not.
  • On GitHub Actions, yamllint's default format writes annotations, and actionlint output is picked up through .github/actionlint-matcher.json.
  • Removed a trailing blank line in .config/lint/commitlintrc.yml so yamllint's empty-lines rule passes. Lefthook has no config flag and only auto-discovers .config/lefthook.yml. just setup --extras passes LEFTHOOK_CONFIG to lefthook install, which writes git hooks that source .config/lint/lefthookrc before lefthook run. The commit-msg hook passes commitlint --config .config/lint/commitlintrc.yml because commitlint-rs only auto-discovers a config in the working directory.
  • .dockerignore ignores .config/lint and no longer lists the old root .commitlintrc.yml or lefthook*.yml patterns. lefthook-local.yml stays ignored because that local override was not moved.

Screenshots / Test

just dev_lint exits 0 on the current tree.

A duplicate YAML key and a workflow step that sets both run and uses each fail the recipe with exit code 1. With GITHUB_ACTIONS=true, the recipe registers the actionlint problem matcher and still exits 0.

Sourcing .config/lint/lefthookrc and running lefthook dump prints the repo hooks. Without that file, lefthook dump is empty. commitlint --config .config/lint/commitlintrc.yml --print-config prints the repo rules. Without --config, commitlint-rs falls back to its defaults.

Links

Open in Web Open in Cursor 

cursoragent and others added 6 commits September 26, 2026 17:58
Add yamllint and actionlint to the dev toolchain and run them from just dev_lint, which just lint, CI, and the pre-push hook already use.

Co-authored-by: Michael Bianco <mike@mikebian.co>
Move the config to .config/yamllint.yml and pass it explicitly so it does not have to live at the repo root.

Co-authored-by: Michael Bianco <mike@mikebian.co>
Move the workflow lint config next to yamllint and pass it with -config-file.

Co-authored-by: Michael Bianco <mike@mikebian.co>
Lefthook discovers .config/lefthook.yml on its own. commitlint-rs does not, so the hook passes --config.

Co-authored-by: Michael Bianco <mike@mikebian.co>
Pass yamllint, actionlint, and commitlint their config paths with long flags. Lefthook has no config flag, so LEFTHOOK_CONFIG points at .config/lint/lefthook.yml. Ignore that directory in Docker and drop the old root config patterns.

Co-authored-by: Michael Bianco <mike@mikebian.co>
Drop the dev shell export. lefthook install still receives the path so it can write hooks that source .config/lint/lefthookrc before lefthook run.

Co-authored-by: Michael Bianco <mike@mikebian.co>
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.

2 participants