diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 787cf68b..242d3518 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -5,7 +5,7 @@ ci: repos: - repo: https://github.com/psf/black - rev: 24.2.0 + rev: 24.3.0 hooks: - id: black @@ -26,7 +26,7 @@ repos: - id: debug-statements - repo: https://github.com/pre-commit/mirrors-clang-format - rev: v17.0.6 + rev: v18.1.1 hooks: - id: clang-format types_or: [c++, c, cuda] diff --git a/include/CLI/TypeTools.hpp b/include/CLI/TypeTools.hpp index 7e66c6ad..50c2a66a 100644 --- a/include/CLI/TypeTools.hpp +++ b/include/CLI/TypeTools.hpp @@ -166,7 +166,7 @@ template class is_direct_constructible { #pragma diag_suppress 2361 #endif #endif - TT{std::declval()} + TT{std::declval()} #ifdef __CUDACC__ #ifdef __NVCC_DIAG_PRAGMA_SUPPORT__ #pragma nv_diag_default 2361 @@ -174,8 +174,8 @@ template class is_direct_constructible { #pragma diag_default 2361 #endif #endif - , - std::is_move_assignable()); + , + std::is_move_assignable()); template static auto test(int, std::false_type) -> std::false_type; diff --git a/include/CLI/impl/App_inl.hpp b/include/CLI/impl/App_inl.hpp index 9dc1a6cf..f3189e49 100644 --- a/include/CLI/impl/App_inl.hpp +++ b/include/CLI/impl/App_inl.hpp @@ -279,8 +279,8 @@ App::set_version_flag(std::string flag_name, std::function vfunc, // Empty name will simply remove the version flag if(!flag_name.empty()) { - version_ptr_ = add_flag_callback( - flag_name, [vfunc]() { throw(CLI::CallForVersion(vfunc(), 0)); }, version_help); + version_ptr_ = + add_flag_callback(flag_name, [vfunc]() { throw(CLI::CallForVersion(vfunc(), 0)); }, version_help); version_ptr_->configurable(false); } diff --git a/tests/HelpTest.cpp b/tests/HelpTest.cpp index e21b29b0..1b844c2f 100644 --- a/tests/HelpTest.cpp +++ b/tests/HelpTest.cpp @@ -1308,8 +1308,7 @@ TEST_CASE("TVersion: help", "[help]") { auto hvers = app.help(); CHECK_THAT(hvers, Contains("help_for_version")); - app.set_version_flag( - "-v", []() { return std::string("VERSION2 " CLI11_VERSION); }, "help_for_version2"); + app.set_version_flag("-v", []() { return std::string("VERSION2 " CLI11_VERSION); }, "help_for_version2"); hvers = app.help(); CHECK_THAT(hvers, Contains("help_for_version2")); } diff --git a/tests/HelpersTest.cpp b/tests/HelpersTest.cpp index 44262417..e7de211e 100644 --- a/tests/HelpersTest.cpp +++ b/tests/HelpersTest.cpp @@ -1058,11 +1058,8 @@ TEST_CASE("RegEx: SplittingNew", "[helpers]") { CHECK_THROWS_AS([&]() { std::tie(shorts, longs, pname) = CLI::detail::get_names({"-hi"}); }(), CLI::BadNameString); CHECK_THROWS_AS([&]() { std::tie(shorts, longs, pname) = CLI::detail::get_names({"---hi"}); }(), CLI::BadNameString); - CHECK_THROWS_AS( - [&]() { - std::tie(shorts, longs, pname) = CLI::detail::get_names({"one", "two"}); - }(), - CLI::BadNameString); + CHECK_THROWS_AS([&]() { std::tie(shorts, longs, pname) = CLI::detail::get_names({"one", "two"}); }(), + CLI::BadNameString); } TEST_CASE("String: ToLower", "[helpers]") { CHECK("one and two" == CLI::detail::to_lower("one And TWO")); }