diff --git a/.clang-tidy b/.clang-tidy index 812baacd..107ed936 100644 --- a/.clang-tidy +++ b/.clang-tidy @@ -3,7 +3,6 @@ Checks: readability-*, -readability-else-after-return, -readability-function-cognitive-complexity, - -readability-named-parameter, -readability-qualified-auto, -readability-static-accessed-through-instance, diff --git a/include/argparse/argparse.hpp b/include/argparse/argparse.hpp index ec27b9d6..8bce3ab5 100644 --- a/include/argparse/argparse.hpp +++ b/include/argparse/argparse.hpp @@ -150,7 +150,7 @@ constexpr bool standard_integer = template constexpr decltype(auto) apply_plus_one_impl(F &&f, Tuple &&t, Extra &&x, - std::index_sequence) { + std::index_sequence unused) { return std::invoke(std::forward(f), std::get(std::forward(t))..., std::forward(x)); } @@ -347,11 +347,11 @@ class ArgumentParser; class Argument { friend class ArgumentParser; - friend auto operator<<(std::ostream &, ArgumentParser const &) + friend auto operator<<(std::ostream &stream, const ArgumentParser &parser) -> std::ostream &; template - explicit Argument(std::string_view(&&a)[N], std::index_sequence) + explicit Argument(std::string_view(&&a)[N], std::index_sequence unused) : mIsOptional((is_optional(a[I]) || ...)), mIsRequired(false), mIsRepeatable(false), mIsUsed(false) { ((void)mNames.emplace_back(a[I]), ...); @@ -866,7 +866,7 @@ class ArgumentParser { : mProgramName(std::move(aProgramName)), mVersion(std::move(aVersion)) { if ((aArgs & default_arguments::help) == default_arguments::help) { add_argument("-h", "--help") - .action([&](const auto &) { + .action([&](const auto &unused) { std::cout << help().str(); std::exit(0); }) @@ -877,7 +877,7 @@ class ArgumentParser { } if ((aArgs & default_arguments::version) == default_arguments::version) { add_argument("-v", "--version") - .action([&](const auto &) { + .action([&](const auto &unused) { std::cout << mVersion; std::exit(0); })