mirror of
https://github.com/kevinveenbirkenbach/computer-playbook.git
synced 2026-11-13 06:06:38 +00:00
Makefile lint integration: * scripts/install/lint.sh: replace the prior checkmake binary install with ensure_mbake (mbake is pip-installable, parses our Makefile correctly whereas checkmake bailed on .ONESHELL: / .SHELLFLAGS: / ifneq). * scripts/lint/makefile.sh: new runner — `mbake format --check Makefile` reports formatting drift and missing .PHONY declarations. * scripts/lint/autoformat.sh: add a two-pass `mbake format Makefile` (mbake's formatter is not strictly idempotent on the first pass). * Makefile: split the multi-line `.PHONY:` block into 18 single-line `.PHONY:` declarations so mbake's parser can validate it; add the previously-missing `install-python-dev` and `build-dependency` PHONY targets; add `lint-makefile` aggregate-and-direct target. * .pre-commit-config.yaml: new make-lint-makefile hook scoped to `^Makefile$`. * .github/workflows/lint-makefile.yml: new CI workflow (pip-install mbake + make lint-makefile). * .github/workflows/ci-orchestrator.yml: wire lint-makefile into lint-gate.needs. Misc: * .gitignore: add roles/importer_result.json (tooling artefact written by galaxy-importer when it runs in roles/). Plus working-tree drift across roles/, group_vars/, inventories/, and tasks/ that accumulated from the make-test setup phase regenerating generated artefacts during recent test runs. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
21 lines
563 B
Bash
Executable File
21 lines
563 B
Bash
Executable File
#!/usr/bin/env bash
|
|
# shellcheck shell=bash
|
|
#
|
|
# Lint the project Makefile via mbake (https://github.com/mavyhq/bake).
|
|
# Reports formatting drift and missing .PHONY declarations against
|
|
# referenced rule names. Auto-fix lives in scripts/lint/autoformat.sh.
|
|
|
|
set -euo pipefail
|
|
|
|
SCRIPT_DIR="$(cd -- "$(dirname -- "${BASH_SOURCE[0]}")" && pwd)"
|
|
REPO_ROOT="$(cd -- "${SCRIPT_DIR}/../.." && pwd)"
|
|
|
|
cd "${REPO_ROOT}"
|
|
|
|
if ! command -v mbake >/dev/null 2>&1; then
|
|
echo "mbake not installed. Run 'make install-lint' first." >&2
|
|
exit 127
|
|
fi
|
|
|
|
mbake format --check Makefile
|