1
0
mirror of https://github.com/CLIUtils/CLI11.git synced 2025-04-29 20:23:55 +00:00
CLI11/scripts/check_style.sh
Henry Fredrick Schreiner 366716eebc Moving check_style
2017-11-20 18:07:13 -05:00

18 lines
330 B
Bash
Executable File

#!/usr/bin/env sh
set -evx
clang-format --version
git ls-files -- '*.cpp' '*.hpp' | xargs clang-format -i -style=file
git diff --exit-code --color
mkdir build-tidy || true
cd build-tidy
CXX_FLAGS="-Werror -Wall -Wextra -pedantic -std=c++11" cmake .. -DCLANG_TIDY_FIX=ON
cmake --build .
git diff --exit-code --color
set +evx