From 33c576f9730da83752b2211efa4752c7f7d3d9af Mon Sep 17 00:00:00 2001 From: Paul Cristian Sarbu Date: Tue, 24 Jun 2025 12:48:33 +0200 Subject: Clarify use of a clang-tidy check The google-default-arguments check normally imposes that virtual methods have no default arguments. For our use-cases, all implementations of such methods are expected to use the same default arguments, and thus this check is manually disabled via NOLINT comments. However, this is not done consistently. This commit cleans this up and clarifies our intent by: - removing the default values (and the NOLINT statement) for all implementations of virtual methods with default argument values, matching the desired intended behaviour, but - keeping the clang-tidy check for future cases where derived classes would want to provide each different defaults. --- src/buildtool/execution_api/remote/bazel/bazel_api.cpp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'src/buildtool/execution_api/remote/bazel/bazel_api.cpp') diff --git a/src/buildtool/execution_api/remote/bazel/bazel_api.cpp b/src/buildtool/execution_api/remote/bazel/bazel_api.cpp index 00bb2e75..11cb7659 100644 --- a/src/buildtool/execution_api/remote/bazel/bazel_api.cpp +++ b/src/buildtool/execution_api/remote/bazel/bazel_api.cpp @@ -151,7 +151,6 @@ BazelApi::BazelApi(BazelApi&& other) noexcept = default; // implement destructor in cpp, where all members are complete types BazelApi::~BazelApi() = default; -// NOLINTNEXTLINE(google-default-arguments) auto BazelApi::CreateAction( ArtifactDigest const& root_digest, std::vector const& command, @@ -191,7 +190,6 @@ auto BazelApi::CreateAction( best_effort}}; } -// NOLINTNEXTLINE(google-default-arguments) [[nodiscard]] auto BazelApi::RetrieveToPaths( std::vector const& artifacts_info, std::vector const& output_paths, @@ -221,7 +219,8 @@ auto BazelApi::CreateAction( auto const result = reader.RecursivelyReadTreeLeafs( info.digest, output_paths[i]); if (not result or - not RetrieveToPaths(result->infos, result->paths)) { + not RetrieveToPaths( + result->infos, result->paths, alternative)) { return false; } } @@ -266,7 +265,6 @@ auto BazelApi::CreateAction( return true; } -// NOLINTNEXTLINE(google-default-arguments) [[nodiscard]] auto BazelApi::RetrieveToFds( std::vector const& artifacts_info, std::vector const& fds, -- cgit v1.2.3