diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 0ad316b4a..e962861fe 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -9,14 +9,6 @@ on: - master jobs: - pre-commit: - name: Formatting - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 - - uses: actions/setup-python@v2 - - uses: pre-commit/action@v2.0.3 - cuda-build: name: CUDA build only runs-on: ubuntu-latest diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 00d77d22f..05b6bf289 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -1,8 +1,6 @@ ci: autoupdate_commit_msg: "chore(deps): pre-commit.ci autoupdate" autofix_commit_msg: "style: pre-commit.ci fixes" - skip: - - docker-clang-format repos: @@ -23,17 +21,10 @@ repos: - id: mixed-line-ending - id: trailing-whitespace -- repo: local +- repo: https://github.com/ssciwr/clang-format-hook + rev: v12.0.1 hooks: - - id: docker-clang-format - name: Docker Clang Format - language: docker_image - types: - - c++ - entry: unibeautify/clang-format:latest - args: - - -style=file - - -i + - id: clang-format - repo: https://github.com/cheshirekow/cmake-format-precommit rev: v0.6.13 diff --git a/include/CLI/App.hpp b/include/CLI/App.hpp index 03b58d9fe..9d3b3c3e5 100644 --- a/include/CLI/App.hpp +++ b/include/CLI/App.hpp @@ -3169,25 +3169,25 @@ struct AppFriend { #ifdef CLI11_CPP14 /// Wrap _parse_short, perfectly forward arguments and return - template static decltype(auto) parse_arg(App *app, Args &&... args) { + template static decltype(auto) parse_arg(App *app, Args &&...args) { return app->_parse_arg(std::forward(args)...); } /// Wrap _parse_subcommand, perfectly forward arguments and return - template static decltype(auto) parse_subcommand(App *app, Args &&... args) { + template static decltype(auto) parse_subcommand(App *app, Args &&...args) { return app->_parse_subcommand(std::forward(args)...); } #else /// Wrap _parse_short, perfectly forward arguments and return template - static auto parse_arg(App *app, Args &&... args) -> + static auto parse_arg(App *app, Args &&...args) -> typename std::result_of::type { return app->_parse_arg(std::forward(args)...); } /// Wrap _parse_subcommand, perfectly forward arguments and return template - static auto parse_subcommand(App *app, Args &&... args) -> + static auto parse_subcommand(App *app, Args &&...args) -> typename std::result_of::type { return app->_parse_subcommand(std::forward(args)...); } diff --git a/include/CLI/Option.hpp b/include/CLI/Option.hpp index 616cd120c..25a676055 100644 --- a/include/CLI/Option.hpp +++ b/include/CLI/Option.hpp @@ -781,7 +781,7 @@ class Option : public OptionBase