wip: smokebuild
[lttng-ci.git] / scripts / babeltrace / check-format.sh
1 #!/bin/bash
2 # SPDX-FileCopyrightText: 2023 Michael Jeanson <mjeanson@efficios.com>
3 # SPDX-License-Identifier: GPL-2.0-or-later
4
5 set -exu
6
7 cd src/babeltrace
8
9 # Check if the topmost patch is properly formatted
10 git diff -U0 --no-color --relative HEAD^ | clang-format-diff-14 -p1 -i
11
12 GIT_DIFF_OUTPUT=$(git diff)
13
14 if [ -n "$GIT_DIFF_OUTPUT" ]; then
15 echo "$GIT_DIFF_OUTPUT"
16 exit 1
17 fi
18
19 # EOF
This page took 0.029781 seconds and 4 git commands to generate.