Fix Apollo clang-format warnings
Reviewers: florijan Reviewed By: florijan Differential Revision: https://phabricator.memgraph.io/D1103
This commit is contained in:
parent
c4327b26f4
commit
10d17b4a35
@ -6,5 +6,6 @@
|
|||||||
- ../../tests # tests source dir
|
- ../../tests # tests source dir
|
||||||
- ../../poc # poc source dir
|
- ../../poc # poc source dir
|
||||||
- ../../.git # git directory (used to find out changed files in commit)
|
- ../../.git # git directory (used to find out changed files in commit)
|
||||||
|
- ../../.clang-format # clang-format config file
|
||||||
outfile_paths:
|
outfile_paths:
|
||||||
- \./memgraph/tools/apollo/\.cppcheck_errors
|
- \./memgraph/tools/apollo/\.cppcheck_errors
|
||||||
|
@ -55,17 +55,19 @@ fi
|
|||||||
format_list=""
|
format_list=""
|
||||||
format_tmp="$DIR/.clang_format"
|
format_tmp="$DIR/.clang_format"
|
||||||
|
|
||||||
|
if [ -f "$format_tmp" ]; then
|
||||||
|
rm "$format_tmp"
|
||||||
|
fi
|
||||||
|
|
||||||
for fname in $files; do
|
for fname in $files; do
|
||||||
if [ ! -f "$fname" ]; then continue; fi
|
if [ ! -f "$fname" ]; then continue; fi
|
||||||
|
echo "Checking formatting errors for: $fname"
|
||||||
clang-format "$fname" > "$format_tmp"
|
clang-format "$fname" > "$format_tmp"
|
||||||
if ! diff "$fname" "$format_tmp" >/dev/null; then
|
if ! diff "$fname" "$format_tmp" >/dev/null; then
|
||||||
format_list+="\n$fname"
|
format_list+="\n$fname"
|
||||||
fi
|
fi
|
||||||
done
|
|
||||||
|
|
||||||
if [ -f "$format_tmp" ]; then
|
|
||||||
rm "$format_tmp"
|
rm "$format_tmp"
|
||||||
fi
|
done
|
||||||
|
|
||||||
if [ "$format_list" != "" ]; then
|
if [ "$format_list" != "" ]; then
|
||||||
if [ "$( cat "$errfile" | wc -l )" -gt 0 ]; then
|
if [ "$( cat "$errfile" | wc -l )" -gt 0 ]; then
|
||||||
|
Loading…
Reference in New Issue
Block a user