diff options
author | Paul Cristian Sarbu <paul.cristian.sarbu@huawei.com> | 2025-06-24 12:48:33 +0200 |
---|---|---|
committer | Paul Cristian Sarbu <paul.cristian.sarbu@huawei.com> | 2025-06-24 16:16:38 +0200 |
commit | 33c576f9730da83752b2211efa4752c7f7d3d9af (patch) | |
tree | 92dab9f0f8164b768315ba4d24dd674cf48d53ee /src/buildtool/execution_api/remote/bazel/bazel_api.hpp | |
parent | 6090ba03c031f7126f0acd5bd89fb895b73eb50f (diff) | |
download | justbuild-33c576f9730da83752b2211efa4752c7f7d3d9af.tar.gz |
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.
Diffstat (limited to 'src/buildtool/execution_api/remote/bazel/bazel_api.hpp')
-rw-r--r-- | src/buildtool/execution_api/remote/bazel/bazel_api.hpp | 12 |
1 files changed, 3 insertions, 9 deletions
diff --git a/src/buildtool/execution_api/remote/bazel/bazel_api.hpp b/src/buildtool/execution_api/remote/bazel/bazel_api.hpp index 99e43578..344ae569 100644 --- a/src/buildtool/execution_api/remote/bazel/bazel_api.hpp +++ b/src/buildtool/execution_api/remote/bazel/bazel_api.hpp @@ -58,7 +58,6 @@ class BazelApi final : public IExecutionApi { auto operator=(BazelApi&&) -> BazelApi& = delete; ~BazelApi() final; - // NOLINTNEXTLINE(google-default-arguments) [[nodiscard]] auto CreateAction( ArtifactDigest const& root_digest, std::vector<std::string> const& command, @@ -67,23 +66,18 @@ class BazelApi final : public IExecutionApi { std::vector<std::string> const& output_dirs, std::map<std::string, std::string> const& env_vars, std::map<std::string, std::string> const& properties, - bool force_legacy = false) const noexcept - -> IExecutionAction::Ptr final; + bool force_legacy) const noexcept -> IExecutionAction::Ptr final; - // NOLINTNEXTLINE(google-default-arguments) [[nodiscard]] auto RetrieveToPaths( std::vector<Artifact::ObjectInfo> const& artifacts_info, std::vector<std::filesystem::path> const& output_paths, - IExecutionApi const* alternative = nullptr) const noexcept - -> bool final; + IExecutionApi const* alternative) const noexcept -> bool final; - // NOLINTNEXTLINE(google-default-arguments) [[nodiscard]] auto RetrieveToFds( std::vector<Artifact::ObjectInfo> const& artifacts_info, std::vector<int> const& fds, bool raw_tree, - IExecutionApi const* alternative = nullptr) const noexcept - -> bool final; + IExecutionApi const* alternative) const noexcept -> bool final; [[nodiscard]] auto ParallelRetrieveToCas( std::vector<Artifact::ObjectInfo> const& artifacts_info, |