Loading...
Loading...
Validate, lint, audit, or check Makefiles and .mk files for errors.
npx skill4agent add akin-ozer/cc-devops-skills makefile-validatorbash scripts/validate_makefile.sh <makefile-path>python3pip3makemake -n --dry-runmakembake validatembake format --checkcheckmakeunmake.mkmakefile-generatorcd devops-skills-plugin/skills/makefile-validatorwritableread-only# From skill directory
bash scripts/validate_makefile.sh <makefile-path>
# From repository root
bash devops-skills-plugin/skills/makefile-validator/scripts/validate_makefile.sh <makefile-path>ErrorsWarningsInfo| Exit code | Meaning | Expected summary line | Action |
|---|---|---|---|
| no blocking findings | | optional improvements only |
| warning-only result | | fix recommended; merge policy dependent |
| error result | | fix required, then rerun |
| Finding type | Reference doc |
|---|---|
| |
| tabs vs spaces, dependency mistakes, credential patterns, anti-patterns | |
| |
bash scripts/validate_makefile.sh <makefile-path>sed -n '1,220p' devops-skills-plugin/skills/makefile-validator/docs/best-practices.md
sed -n '1,220p' devops-skills-plugin/skills/makefile-validator/docs/common-mistakes.md
sed -n '1,220p' devops-skills-plugin/skills/makefile-validator/docs/bake-tool.md
rg -n "PHONY|DELETE_ON_ERROR|ONESHELL|tab|credential|mbake" devops-skills-plugin/skills/makefile-validator/docs/*.mddevops-skills-plugin/skills/makefile-validatorsed -n '1,220p' docs/best-practices.md
sed -n '1,220p' docs/common-mistakes.md
sed -n '1,220p' docs/bake-tool.md
rg -n "PHONY|DELETE_ON_ERROR|ONESHELL|tab|credential|mbake" docs/*.md| Constraint | Fallback action | Reporting requirement |
|---|---|---|
| Run limited checks ( | State that |
| Keep syntax/custom checks that still work; defer formatter/linter stages | Report install failure and request rerun in a network-enabled environment |
| Continue with non-syntax stages; script already downgrades syntax stage | Explicitly note syntax coverage was skipped |
| Continue; these are optional stages | Note optional lint/portability coverage not executed |
| target file is read-only | Provide patch suggestions only | Mark response as advisory only |
| command execution unavailable | Provide static review from file contents and docs | Mark result as non-executed analysis |
# Syntax only (when make exists)
make -f <makefile-path> -n --dry-run
# Focused quick checks
grep -n "^\\.DELETE_ON_ERROR:" <makefile-path>
grep -n "^\\.PHONY:" <makefile-path>
grep -nE "^( | | )[a-zA-Z@\\$\\(]" <makefile-path>exit 0Errors: 0
Warnings: 0
Info: 2
✓ Validation PASSEDexit 1Errors: 0
Warnings: 3
Info: 1
⚠ Validation PASSED with warningsexit 2Errors: 2
Warnings: 1
Info: 0
⚠ Validation FAILED - errors must be fixedcommand -v python3 pip3 makemake -f <makefile-path> -n --dry-rungrep -nE "^( | | )[a-zA-Z@\\$\\(]" <makefile-path>NO_COLOR=1 bash scripts/validate_makefile.sh <makefile-path> > /tmp/makefile-validator.log 2>&1
echo "exit=$? log=/tmp/makefile-validator.log"makefile-validator/
├── SKILL.md
├── scripts/
│ └── validate_makefile.sh
├── docs/
│ ├── best-practices.md
│ ├── common-mistakes.md
│ └── bake-tool.md
└── examples/
├── good-makefile.mk
└── bad-makefile.mk012namedescription