diff --git a/.gitlab-ci/format.yml b/.gitlab-ci/format.yml index 11f818a6b7ed63010928d5d2151471a57aca165c..0b7de6f79c279234be9570b0a19871b4f7a99c4b 100644 --- a/.gitlab-ci/format.yml +++ b/.gitlab-ci/format.yml @@ -14,9 +14,9 @@ clang-format: script: - .ci/format/apply_clang_format.sh --output-patch-file "${FORMAT_PATCH_FILE}" variables: - CLANG_COMPILER_VERSION: "11" + CLANG_COMPILER_VERSION: "18" tags: - - ubuntu-22.04-amd64 + - ubuntu-24.04-amd64 shfmt: extends: diff --git a/examples/large_example.cpp b/examples/large_example.cpp index c769776a097ee91d441217d8218f360c1b26e927..2e321a5d9d43483d2831c2f3a1c107e71e85d975 100644 --- a/examples/large_example.cpp +++ b/examples/large_example.cpp @@ -446,8 +446,7 @@ int main(int argc, char *argv[]) { } if (!*parser) { - std::cout << "Parsing failed!" - << "\n"; + std::cout << "Parsing failed!" << "\n"; return EXIT_FAILURE; } @@ -465,21 +464,17 @@ int main(int argc, char *argv[]) { process_time_container(parser->time); if (parser->cmd1) { - std::cout << "cmd1 given" - << "\n"; + std::cout << "cmd1 given" << "\n"; process_cmd1(parser->cmd1); } else { - std::cout << "cmd1 not given" - << "\n"; + std::cout << "cmd1 not given" << "\n"; } if (parser->cmd2) { - std::cout << "cmd2 given" - << "\n"; + std::cout << "cmd2 given" << "\n"; process_cmd2(parser->cmd2); } else { - std::cout << "cmd2 not given" - << "\n"; + std::cout << "cmd2 not given" << "\n"; } } catch (clapp::clapp_exception_t &e) { std::cout << "Caught ClaPP-Exception: " << e.what() << "\n"; diff --git a/examples/short_example.cpp b/examples/short_example.cpp index 4fa07c0c8c9735290afba31a46268de8f96803df..961094304e6e00194921820550cee0ae7fcfa734 100644 --- a/examples/short_example.cpp +++ b/examples/short_example.cpp @@ -119,16 +119,14 @@ int main(int argc, char *argv[]) { } std::cout << "\n"; } else { - std::cout << "variadic-string-arg: not given" - << "\n"; + std::cout << "variadic-string-arg: not given" << "\n"; } CLAPP_CONTRACT_EXPECTS( parser->options.string_param); // The parser ensures that // mandatory options are given std::cout << "string_param: '" << parser->options.string_param.value() - << "'" - << "\n"; + << "'" << "\n"; if (parser->options .string_vector_param) { // if string_vector_param is given @@ -141,8 +139,7 @@ int main(int argc, char *argv[]) { } std::cout << "\n"; } else { - std::cout << "string_vector_param: not given" - << "\n"; + std::cout << "string_vector_param: not given" << "\n"; } } catch (clapp::clapp_exception_t &e) { std::cout << "Caught ClaPP-Exception: " << e.what() << "\n"; diff --git a/examples/sub_parser_example.cpp b/examples/sub_parser_example.cpp index b8c7d7274c125196b221cbc809741a4798f56593..f5ea8c264814873b697c1b8b35498a28ac185238 100644 --- a/examples/sub_parser_example.cpp +++ b/examples/sub_parser_example.cpp @@ -139,8 +139,7 @@ clapp::value::found_func_t::ret_t print_version_and_exit( clapp::value::found_func_t::ret_t print_not_implemented_and_exit( const std::string &option) { std::cout << "Option '" << option - << "' currently not implemented: don't use it!" - << "\n"; + << "' currently not implemented: don't use it!" << "\n"; return clapp::value::exit_t::exit(EXIT_FAILURE); } @@ -218,21 +217,17 @@ int main(int argc, char *argv[]) { } if (parser->first) { // if the first sub-parser is selected - std::cout << "first parser active" - << "\n"; + std::cout << "first parser active" << "\n"; process_first(parser->first); } else { - std::cout << "first parser not active" - << "\n"; + std::cout << "first parser not active" << "\n"; } if (parser->second) { // if the first sub-parser is selected - std::cout << "second parser active" - << "\n"; + std::cout << "second parser active" << "\n"; process_second(parser->second); } else { - std::cout << "second parser not active" - << "\n"; + std::cout << "second parser not active" << "\n"; } } catch (clapp::clapp_exception_t &e) { std::cout << "Caught ClaPP-Exception: " << e.what() << "\n";