Files
GmSSL/vendor/liboqs/.travis/style-check.sh
zhaoxiaomeng 53af3b51ae quantum init
2018-01-04 13:40:59 +08:00

24 lines
515 B
Bash
Executable File

#!/bin/bash
if [ ! -x "$(which clang-format-3.9)" ]; then
# If clang-format is not version -3.9, just use clang-format
CLANGFORMAT=clang-format make prettyprint
else
CLANGFORMAT=clang-format-3.9 make prettyprint
fi;
modified=$(git status -s)
if [ "$modified" ]; then
tput setaf 1;
echo "Code does not adhere to the project standards. Run \"make prettyprint\".";
tput sgr 0;
git status -s
exit 1;
else
tput setaf 2;
echo "Code adheres to the project standards (prettyprint).";
tput sgr 0;
exit 0;
fi;