From 65a2293fc9504c4c197e994e2d1c3d85056c05a5 Mon Sep 17 00:00:00 2001 From: Krzysztof kuhy Rudnicki Date: Mon, 22 Jun 2026 07:37:45 +0200 Subject: [PATCH] Exclude immutable shutdown script from EOF/whitespace fixer hooks setup_midnight_shutdown.sh has chattr +i set as a deliberate self-commitment lock, so the fixer hooks can't open it for writing even as the owning user. This was blocking every git push via the pre-push hook stage, unrelated to whatever else is being pushed. The file is already compliant (no trailing whitespace, single trailing newline), so excluding it from these two hooks loses no real check. Co-Authored-By: Claude Sonnet 4.6 Claude-Session: https://claude.ai/code/session_01A7vbgtFfZmfxJtN5DdtJky --- .pre-commit-config.yaml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 63c705f..bcd5cee 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -34,7 +34,12 @@ repos: hooks: - id: trailing-whitespace args: [--markdown-linebreak-ext=md] + # chattr +i (self-commitment lock on the shutdown-enforcement + # script) makes this file unwritable on purpose; the fixer hooks + # can't open it for writing even as the owning user. + exclude: ^linux_configuration/scripts/periodic_background/digital_wellbeing/setup_midnight_shutdown\.sh$ - id: end-of-file-fixer + exclude: ^linux_configuration/scripts/periodic_background/digital_wellbeing/setup_midnight_shutdown\.sh$ - id: check-yaml args: [--unsafe] - id: check-json