From 8c51c23c2455735e1215150656e50e435bcaad48 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Fri, 12 Jun 2026 19:10:09 +0000 Subject: [PATCH] chore: add local hook to restore final newline after mbake-format --- .pre-commit-config.yaml | 7 +++++++ 1 file changed, 7 insertions(+) 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]