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