Adguardhome/scripts/hooks/pre-commit
Eugene Burkov 03564ba916 Pull request 2580: upd-all
Squashed commit of the following:

commit aace74ffe7a6609f884f6ba3353916978c90a9db
Author: Eugene Burkov <E.Burkov@AdGuard.COM>
Date:   Mon Feb 9 16:51:49 2026 +0300

    all: reformat json

commit 43fd2970cba738701d84885f78ef812c9abd182b
Author: Eugene Burkov <E.Burkov@AdGuard.COM>
Date:   Mon Feb 9 15:33:27 2026 +0300

    scripts: upd

commit e5c8d1fe6021021d1c9079e7caa376fb83bf0136
Author: Eugene Burkov <E.Burkov@AdGuard.COM>
Date:   Mon Feb 9 14:06:12 2026 +0300

    client: upd i18n

commit 3d115bb49a5d97096ef98c3e1bd726109421e7f1
Author: Eugene Burkov <E.Burkov@AdGuard.COM>
Date:   Mon Feb 9 14:01:08 2026 +0300

    all: upd go & tools
2026-02-09 15:31:24 +00:00

29 lines
672 B
Bash
Executable file

#!/bin/sh
# This comment is used to simplify checking local copies of the script. Bump
# this number every time a significant change is made to this script.
#
# AdGuard-Project-Version: 6
set -e -f -u
. ./scripts/hooks/helper.sh
# Warn the programmer about temporary todos and skel FIXMEs, but do not fail the
# commit, because the commit could be in a temporary branch.
temp_todos="$(
git grep -e 'FIXME' -e 'TODO.*!!' -- \
':!./scripts/hooks/pre-commit' \
':!./client' \
|| :
)"
readonly temp_todos
if [ "$temp_todos" != '' ]; then
printf 'WARNING: you have temporary todos:\n\n%s\n\n' "$temp_todos"
prompt
fi
check_unstaged_changes
lint_staged_changes