X-Git-Url: http://git.lttng.org./?a=blobdiff_plain;f=scripts%2Fcommon%2Fcheck-format.sh;h=88d0d337b1f87769bf1364ab5f058bd60bb50cd4;hb=2c34ea1488ea3241038be5ef41a099ea14d42041;hp=db9505d4e393a87340695c41df55df568baf29fc;hpb=2abd3a647f0ac520053583bc6be3312dad4695b4;p=lttng-ci.git diff --git a/scripts/common/check-format.sh b/scripts/common/check-format.sh index db9505d..88d0d33 100644 --- a/scripts/common/check-format.sh +++ b/scripts/common/check-format.sh @@ -1,4 +1,5 @@ #!/bin/bash +# # SPDX-FileCopyrightText: 2023 Michael Jeanson # SPDX-License-Identifier: GPL-2.0-or-later @@ -32,10 +33,12 @@ git diff -U0 --no-color --relative HEAD^ | clang-format-diff-14 -p1 -i # If the tree has local changes, the formatting was incorrect GIT_DIFF_OUTPUT=$(git diff) if [ -n "$GIT_DIFF_OUTPUT" ]; then - print_header "Saving clang-format proposed fixes in clang-format-fixes.diff" - git diff > "$WORKSPACE/clang-format-fixes.diff" - exit 1 + print_header "Saving clang-format proposed fixes in clang-format-fixes.diff" + git diff > "$WORKSPACE/clang-format-fixes.diff" + exit 1 fi print_header "clang-format is happy!" + # EOF +# vim: expandtab tabstop=4 shiftwidth=4