"vscode:/vscode.git/clone" did not exist on "431e53debcb8b38249801bd0b76eea228cdd9753"
.clang_format.hook 353 Bytes
Newer Older
LDOUVLEV's avatar
LDOUVLEV committed
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
#!/bin/bash
set -e

readonly VERSION="3.8"

version=$(clang-format -version)

if ! [[ $version == *"$VERSION"* ]]; then
    echo "clang-format version check failed."
    echo "a version contains '$VERSION' is needed, but get '$version'"
    echo "you can install the right version, and make an soft-link to '\$PATH' env"
    exit -1
fi

clang-format $@