diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 37d3b860..b71438e6 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -74,3 +74,10 @@ repos: hooks: - id: mbake-format - id: mbake-validate + - repo: local + hooks: + - id: makefile-final-newline + name: Restore final newline stripped by mbake-format + entry: bash -c 'for f in "$@"; do [ -n "$(tail -c1 "$f")" ] && printf "\n" >> "$f"; done' -- + language: system + types: [makefile]