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 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01A7vbgtFfZmfxJtN5DdtJky
This commit is contained in:
Krzysztof kuhy Rudnicki 2026-06-22 07:37:45 +02:00
parent e0ecd58c1d
commit 65a2293fc9

View File

@ -34,7 +34,12 @@ repos:
hooks: hooks:
- id: trailing-whitespace - id: trailing-whitespace
args: [--markdown-linebreak-ext=md] 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 - id: end-of-file-fixer
exclude: ^linux_configuration/scripts/periodic_background/digital_wellbeing/setup_midnight_shutdown\.sh$
- id: check-yaml - id: check-yaml
args: [--unsafe] args: [--unsafe]
- id: check-json - id: check-json