From 366716eebc997bd942445a31e5be9f302b4bfb3a Mon Sep 17 00:00:00 2001 From: Henry Fredrick Schreiner Date: Mon, 20 Nov 2017 16:09:53 -0500 Subject: [PATCH] Moving check_style --- .ci/check_style.sh | 17 ----------------- .travis.yml | 2 +- CHANGELOG.md | 3 +++ CONTRIBUTING.md | 3 +-- scripts/check_style.sh | 17 +++++++++++++++++ 5 files changed, 22 insertions(+), 20 deletions(-) delete mode 100755 .ci/check_style.sh create mode 100755 scripts/check_style.sh diff --git a/.ci/check_style.sh b/.ci/check_style.sh deleted file mode 100755 index 2d3c0a7..0000000 --- a/.ci/check_style.sh +++ /dev/null @@ -1,17 +0,0 @@ -#!/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 diff --git a/.travis.yml b/.travis.yml index 0154fec..7af9c18 100644 --- a/.travis.yml +++ b/.travis.yml @@ -65,7 +65,7 @@ script: - | if [ -n "$CHECK_STYLE" ] then - .ci/check_style.sh + scripts/check_style.sh else .ci/travis.sh fi diff --git a/CHANGELOG.md b/CHANGELOG.md index cbb2c46..a85dc66 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,6 @@ ## Version 1.3 (in progress) + +* Reworked the way defaults are set and inherited; explicit control given to user with `->option_defaults()` [#48](https://github.com/CLIUtils/CLI11/pull/48) * `parse` no longer returns (so `CLI11_PARSE` is always usable) [#37](https://github.com/CLIUtils/CLI11/pull/37) * Added `remaining()` and `remaining_size()` [#37](https://github.com/CLIUtils/CLI11/pull/37) * `allow_extras` and `prefix_command` are now valid on subcommands [#37](https://github.com/CLIUtils/CLI11/pull/37) @@ -8,6 +10,7 @@ * Help flags are easier to customize [#43](https://github.com/CLIUtils/CLI11/pull/43) * Subcommand now support groups [#46](https://github.com/CLIUtils/CLI11/pull/46) * `CLI::RuntimeError` added, for easy exit with error codes [#45](https://github.com/CLIUtils/CLI11/pull/45) +* The clang-format script is now no longer "hidden" [#48](https://github.com/CLIUtils/CLI11/pull/48) ## Version 1.2 diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 41a4a05..f4a6784 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -17,5 +17,4 @@ In general, make sure the addition is well thought out and does not increase the * Once you make the PR, tests will run to make sure your code works on all supported platforms * The test coverage is also measured, and that should remain 100% -* Formatting should be done with clang-format, otherwise the format check will not pass. However, it is trivial to apply this to your PR, so don't worry about this check - +* Formatting should be done with clang-format, otherwise the format check will not pass. However, it is trivial to apply this to your PR, so don't worry about this check. If you do have clang-format, just run `scripts/check_style.sh` diff --git a/scripts/check_style.sh b/scripts/check_style.sh new file mode 100755 index 0000000..2d3c0a7 --- /dev/null +++ b/scripts/check_style.sh @@ -0,0 +1,17 @@ +#!/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 -- libgit2 0.21.4