Skip to content

Commit

Permalink
[style] Fix clang-format to version 9.
Browse files Browse the repository at this point in the history
  • Loading branch information
turon committed Mar 19, 2020
1 parent 1dc5696 commit 789f0d0
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions BUILDING.md
Original file line number Diff line number Diff line change
Expand Up @@ -121,11 +121,11 @@ additional packages are required and are invoked by `bootstrap`:
On Debian-based Linux distributions such as Ubuntu, these dependencies
can be satisfied with the following:

% sudo apt-get install autoconf automake libtool
% sudo apt-get install autoconf automake libtool clang-format-9

#### Mac OS X

On Mac OS X, these dependencies can be installed and satisfied using
[Brew](https://brew.sh/):

% brew install autoconf automake libtool
% brew install autoconf automake libtool llvm@9
8 changes: 4 additions & 4 deletions integrations/clang/clang-format.sh
Original file line number Diff line number Diff line change
@@ -1,24 +1,24 @@
#!/usr/bin/env bash

CLANG_FORMAT_VERSION="clang-format version 6.0"
CLANG_FORMAT_VERSION="clang-format version 9.0"

die() {
echo " *** ERROR: " $*
exit 1
}

if which clang-format-6.0 > /dev/null; then
alias clang-format=clang-format-6.0
alias clang-format=clang-format-9.0
elif which clang-format > /dev/null; then
case "$(clang-format --version)" in
"$CLANG_FORMAT_VERSION"*)
;;
*)
die "$(clang-format --version); clang-format 6.0 required"
die "$(clang-format --version); clang-format 9.0 required"
;;
esac
else
die "clang-format 6.0 required"
die "clang-format 9.0 required"
fi

clang-format $@ || die
Expand Down

0 comments on commit 789f0d0

Please sign in to comment.