Fix Apollo clang-format warnings

Reviewers: florijan

Reviewed By: florijan

Differential Revision: https://phabricator.memgraph.io/D1103
This commit is contained in:
Matej Ferencevic 2018-01-12 10:19:37 +01:00
parent c4327b26f4
commit 10d17b4a35
2 changed files with 7 additions and 4 deletions

View File

@ -6,5 +6,6 @@
- ../../tests # tests source dir
- ../../poc # poc source dir
- ../../.git # git directory (used to find out changed files in commit)
- ../../.clang-format # clang-format config file
outfile_paths:
- \./memgraph/tools/apollo/\.cppcheck_errors

View File

@ -55,17 +55,19 @@ fi
format_list=""
format_tmp="$DIR/.clang_format"
if [ -f "$format_tmp" ]; then
rm "$format_tmp"
fi
for fname in $files; do
if [ ! -f "$fname" ]; then continue; fi
echo "Checking formatting errors for: $fname"
clang-format "$fname" > "$format_tmp"
if ! diff "$fname" "$format_tmp" >/dev/null; then
format_list+="\n$fname"
fi
done
if [ -f "$format_tmp" ]; then
rm "$format_tmp"
fi
done
if [ "$format_list" != "" ]; then
if [ "$( cat "$errfile" | wc -l )" -gt 0 ]; then