Skip to content
Snippets Groups Projects
Commit 8ae0ecbd authored by David Goulet's avatar David Goulet :panda_face:
Browse files

scripts: Add env variable to disable pre-commit hook


We introduce TOR_EXTRA_PRE_COMMIT_CHECKS environment variable to run the
pre-commit hook. The pre-push git hook will set it in order to run all
pre-commit checks.

Signed-off-by: David Goulet's avatarDavid Goulet <dgoulet@torproject.org>
parent 064e23e9
No related branches found
No related tags found
No related merge requests found
......@@ -7,6 +7,11 @@
# it fails our code formatting, changelog entry formatting, module include
# rules, or best practices tracker.
# Run only if this environment variable is set.
if [ -z "$TOR_EXTRA_PRE_COMMIT_CHECKS" ]; then
exit 0
fi
workdir=$(git rev-parse --show-toplevel)
cd "$workdir" || exit 1
......
......@@ -83,6 +83,7 @@ do
src/tools/*.[ch] \
)"
export TOR_EXTRA_PRE_COMMIT_CHECKS=1
# We want word splitting here, because file names are space
# separated
# shellcheck disable=SC2086
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment