diff options
author | Konstantinos Sideris <sideris.konstantin@gmail.com> | 2017-09-24 17:08:11 +0300 |
---|---|---|
committer | Konstantinos Sideris <sideris.konstantin@gmail.com> | 2017-09-24 17:08:11 +0300 |
commit | 37ff1398b78e5685080e94d532de84691a3ecddc (patch) | |
tree | 575ea42940bb94586fb0a5198a2f855266c850ff /.ci | |
parent | Manually remove KDE accelerators (diff) | |
download | nheko-37ff1398b78e5685080e94d532de84691a3ecddc.tar.xz |
Add clang-format to ci
Diffstat (limited to '.ci')
-rwxr-xr-x | .ci/format.sh | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/.ci/format.sh b/.ci/format.sh new file mode 100755 index 00000000..be15598a --- /dev/null +++ b/.ci/format.sh @@ -0,0 +1,14 @@ +#!/usr/bin/env bash + +# Runs the Clang Formatter +# Return codes: +# - 1 there are files to be formatted +# - 0 everything looks fine + +set -o errexit +set -o pipefail +set -o nounset + +FILES=`find include src tests -type f -type f \( -iname "*.cc" -o -iname "*.h" \)` + +clang-format -i $FILES && git diff --exit-code |