
Audit Your Makefile Before It Breaks the Build
Catch the missing tab before make does. #工程
Audit a Makefile offline before it breaks the build: catch recipe lines indented with spaces instead of a tab, phony targets missing from .PHONY, duplicate target definitions, empty targets, undefined and unused variables, a missing trailing newline, trailing whitespace, bare cd lines, timestamps in recipes, and target names with spaces. Deterministic pass/fail results plus JSON and Markdown reports. Reads the Makefile as text only, never invokes make, never executes anything. Eleven deterministic rules. Makefile parser (targets, variables, .PHONY, recipe lines). Space-indent vs tab recipe check. Missing .PHONY check for action targets. Duplicate, empty and spaced target checks. Undefined and unused variable checks. Bare cd and timestamp-in-recipe checks. Critical vs warning severities with CI-friendly exit codes. JSON and Markdown reports. No external dependencies. Requirements: Python 3.9+; a Makefile.