From 414bff9d92dca69c6dc827bbf8af86a635dacbb1 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Fri, 2 May 2025 15:51:39 +0000 Subject: [PATCH] style: pre-commit.ci fixes --- examples/CMakeLists.txt | 18 +++++++++--------- examples/close_match.cpp | 6 +++--- 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/examples/CMakeLists.txt b/examples/CMakeLists.txt index b01e8f95..3d8373d3 100644 --- a/examples/CMakeLists.txt +++ b/examples/CMakeLists.txt @@ -251,20 +251,20 @@ set_property(TEST retired_retired_test3 PROPERTY PASS_REGULAR_EXPRESSION "WARNIN set_property(TEST retired_deprecated PROPERTY PASS_REGULAR_EXPRESSION "deprecated.*not_deprecated") if(CMAKE_CXX_STANDARD GREATER 13) -add_cli_exe(close_match close_match.cpp) + add_cli_exe(close_match close_match.cpp) -add_test(NAME close_match_test COMMAND close_match i) -add_test(NAME close_match_test2 COMMAND close_match upg) -add_test(NAME close_match_test3 COMMAND close_match rem) -add_test(NAME close_match_test4 COMMAND close_match upgrde) + add_test(NAME close_match_test COMMAND close_match i) + add_test(NAME close_match_test2 COMMAND close_match upg) + add_test(NAME close_match_test3 COMMAND close_match rem) + add_test(NAME close_match_test4 COMMAND close_match upgrde) -set_property(TEST close_match_test PROPERTY PASS_REGULAR_EXPRESSION "install") + set_property(TEST close_match_test PROPERTY PASS_REGULAR_EXPRESSION "install") -set_property(TEST close_match_test2 PROPERTY PASS_REGULAR_EXPRESSION "upgrade") + set_property(TEST close_match_test2 PROPERTY PASS_REGULAR_EXPRESSION "upgrade") -set_property(TEST close_match_test3 PROPERTY PASS_REGULAR_EXPRESSION "remove") + set_property(TEST close_match_test3 PROPERTY PASS_REGULAR_EXPRESSION "remove") -set_property(TEST close_match_test4 PROPERTY PASS_REGULAR_EXPRESSION "closest match is upgrade") + set_property(TEST close_match_test4 PROPERTY PASS_REGULAR_EXPRESSION "closest match is upgrade") endif() #-------------------------------------------- add_cli_exe(custom_parse custom_parse.cpp) diff --git a/examples/close_match.cpp b/examples/close_match.cpp index 97e1161a..1f27270b 100644 --- a/examples/close_match.cpp +++ b/examples/close_match.cpp @@ -7,15 +7,15 @@ // Code inspired by discussion from https://github.com/CLIUtils/CLI11/issues/1149 #include +#include #include #include #include #include #include #include -#include -//only works with C++14 or higher +// only works with C++14 or higher // Levenshtein distance function code generated by chatgpt/copilot std::size_t levenshteinDistance(const std::string &s1, const std::string &s2) { @@ -78,7 +78,7 @@ void addSubcommandCloseMatchDetection(CLI::App *app, std::size_t minDistance = 3 } } // add a callback that runs before a final callback and loops over the remaining arguments for subcommands - app->parse_complete_callback([&app, minDistance,list=std::move(list)]() { + app->parse_complete_callback([&app, minDistance, list = std::move(list)]() { auto extras = app->remaining(); if(extras.empty()) { return;