Files
computer-playbook/scripts/lint
kevinveenbirkenbachandClaude Opus 5.5 ea54696222 fix(lint): make mbake format the Makefile the same on every machine
The repository installs mbake unpinned and shipped no .bake.toml, so the
Makefile's final newline depended on the mbake version:

- mbake 1.4.6 (e.g. the pkgmgr venv that wins on a host PATH) defaults
  to ensure_final_newline = false: `mbake format` strips the newline and
  `mbake format --check` accepts the stripped file.
- mbake 1.5.0 (what pip installs today) rejects the same file with
  "Missing final newline", which is what CI reported on PR #1255.

So a local `make autoformat` could strip the newline, the local
lint-makefile stayed green, and CI failed; 6f653ce633 and #1262 had to
restore the newline by hand.

The tracked .bake.toml sets only ensure_final_newline = true, so every
other formatter rule keeps its default. autoformat.sh and makefile.sh
pass it with --config, so the result no longer depends on the version
or on the directory mbake runs from. Checked with both versions: main's
Makefile passes `--check --config .bake.toml`, and a copy without the
final newline fails it with "Missing final newline".

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-29 09:16:12 +01:00
..

Lint Scripts

This directory contains scripts that run repository lint checks.

  • 🧹 Execute focused lint checks for workflows, Ansible, Python, and shell scripts
  • 🔎 Keep lint entry points small, explicit, and callable from make
  • ✅ Separate lint execution from tool installation and environment bootstrap

Changed files only 🎯

Outside CI, wrapper.sh lists every file changed since the merge-base of HEAD and INFINITO_LINT_DIFF_BASE (default origin/main, untracked files included) and hands the list to the container as LINT_DIFF_FILES. The ansible, javascript, markdown, mermaid, shellcheck and sql lints, and the matching workers of autoformat, then check only those files. They check every file again when the list names their own configuration or a shared lint script, when INFINITO_LINT_DIFF_BASE is empty or has no merge-base, and in CI. The rules live in diff/files.sh.

lint-ansible additionally skips ansible-lint while the tree matches the last green run, which autoformat records after a clean ansible-lint --fix (ansible/stamp.sh); the playbook syntax check always runs.

The scope of this folder is lint execution. Tool installation belongs in scripts/install, while build and test workflows should stay in their dedicated script directories.