Files
OpenVR-AdvancedSettings-frame/build_scripts/linux/format.sh
T
Vasily da25e58cbb Add clang-tidy, create Linux build script
clang-tidy is currently set up with errors for all checks that do not
warn. This is to prevent regressing the repo.

Gradually these warnings should be removed in order to prevent further
regresssions in warnings that do not have many occurences.
2019-02-28 21:16:53 +01:00

18 lines
488 B
Bash
Executable File

#!/usr/bin/env bash
set -e
clang-format --version
if [ $? -eq 0 ]; then
echo "Clang-format found."
build_path="`dirname \"$0\"`"
project_path=$build_path/../..
find $project_path/src/ -regex '.*\.\(cpp\|h\)' -exec clang-format -style=file -i {} \; -exec echo "Iteration 1: {}" \;
find $project_path/src/ -regex '.*\.\(cpp\|h\)' -exec clang-format -style=file -i {} \; -exec echo "Iteration 2: {}" \;
echo "DONE"
else
echo "Could not find clang-format."
fi