makefile-linter
Installation
SKILL.md
makefile-linter
A pure-Python 3 (stdlib only) Makefile linter. Detects common issues including tab/space errors, missing .PHONY declarations, unused/undefined variables, hardcoded paths, shell portability problems, and more.
Commands
lint FILE
Lint a Makefile and report issues.
python3 scripts/makefile-linter.py lint Makefile
python3 scripts/makefile-linter.py lint /path/to/Makefile
echo -e "all:\n\techo hello" | python3 scripts/makefile-linter.py lint /dev/stdin
targets FILE
List all targets with line numbers, phony status, prerequisites, and inline comment descriptions.