0
0
mirror of https://github.com/fralx/LimeReport.git synced 2024-12-24 00:33:02 +03:00
LimeReport/tools/check_code_style.sh
Андрей Лухнов 0fca7169d3 Define code style and format all source file using clang-format-14
except those placed in 3rdparty directories.
2024-09-19 21:09:38 +03:00

12 lines
286 B
Bash
Executable File

#!/bin/bash
FORMATTER="clang-format-14"
find . -type f \
-regextype posix-extended -regex '^.*\.(cpp|c\+\+|cxx|cc|h|hh|hpp|h\+\+|hxx)$' \
-not -path '*3rdparty*' \
-exec ${FORMATTER} -i -style=file {} \;
git status > /dev/null
git diff-index --exit-code --name-only HEAD