memgraph/format
Mislav Bradac cbe6648eb8 Migrate command line args to gflgs in tests
Summary: Some other minor cleanups

Reviewers: buda

Reviewed By: buda

Subscribers: pullbot

Differential Revision: https://phabricator.memgraph.io/D523
2017-07-06 13:54:12 +02:00

18 lines
578 B
Bash
Executable File

#!/bin/bash
# This scrips runs clang-format recursively on all files under specified
# directories. Formatting configuration is defined in .clang-format.
# Format isn't enforced. Code reviewer has to ensure that a code format is
# valid and appropriate for the project.
clang_format="clang-format"
for directory in src tests
do
# If somebody wants to exclude a file from default formating here is a place
# for that
echo "formatting code under $directory/"
find "$directory" \( -name '*.hpp' -or -name '*.cpp' \) -print0 | xargs -0 "${clang_format}" -i
done