From 3c9317fa33c6449056f9e34b1d08e5f62a3a3a92 Mon Sep 17 00:00:00 2001 From: Jacob Bohanon Date: Wed, 6 Sep 2023 18:37:08 -0400 Subject: [PATCH 1/2] fix push hook to use the new bazel-y check format call Signed-off-by: Jacob Bohanon --- support/hooks/pre-push | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/support/hooks/pre-push b/support/hooks/pre-push index c07afe49bc181..cd54be79399bf 100755 --- a/support/hooks/pre-push +++ b/support/hooks/pre-push @@ -72,7 +72,7 @@ do # either of these things aren't true, the check fails. for i in $(git diff --name-only "$RANGE" --diff-filter=ACMR --ignore-submodules=all 2>&1); do echo -ne " Checking format for $i - " - "$SCRIPT_DIR"/code_format/check_format.py check "$i" || exit 1 + bazel run //tools/code_format:check_format -- check "$i" # TODO(phlax): It seems this is not running in CI anymore and is now finding issues # in merged PRs. Unify this hook and format checks in CI when the new format tool is rolled From 1cd82f3e53d6410aa9c1dd2b090ff3ea2b165505 Mon Sep 17 00:00:00 2001 From: Jacob Bohanon Date: Wed, 6 Sep 2023 18:43:38 -0400 Subject: [PATCH 2/2] || exit 1 Signed-off-by: Jacob Bohanon --- support/hooks/pre-push | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/support/hooks/pre-push b/support/hooks/pre-push index cd54be79399bf..cd9687dbb651c 100755 --- a/support/hooks/pre-push +++ b/support/hooks/pre-push @@ -72,7 +72,7 @@ do # either of these things aren't true, the check fails. for i in $(git diff --name-only "$RANGE" --diff-filter=ACMR --ignore-submodules=all 2>&1); do echo -ne " Checking format for $i - " - bazel run //tools/code_format:check_format -- check "$i" + bazel run //tools/code_format:check_format -- check "$i" || exit 1 # TODO(phlax): It seems this is not running in CI anymore and is now finding issues # in merged PRs. Unify this hook and format checks in CI when the new format tool is rolled