diff options
author | Maksim Denisov <denisov.maksim@huawei.com> | 2024-09-30 12:16:43 +0200 |
---|---|---|
committer | Maksim Denisov <denisov.maksim@huawei.com> | 2024-10-07 13:37:39 +0200 |
commit | ce23db59c6399199fa55b4b7dc8880522e2f1bca (patch) | |
tree | 5b77d3c84289f023cbe6f4a81cf391a0087fe660 /src/buildtool/common/cli.hpp | |
parent | e5d7cb5ce5b9cc40b0c56b18980a4234118c1739 (diff) | |
download | justbuild-ce23db59c6399199fa55b4b7dc8880522e2f1bca.tar.gz |
Enable readability-redundant-member-init check.
Diffstat (limited to 'src/buildtool/common/cli.hpp')
-rw-r--r-- | src/buildtool/common/cli.hpp | 68 |
1 files changed, 34 insertions, 34 deletions
diff --git a/src/buildtool/common/cli.hpp b/src/buildtool/common/cli.hpp index 520b8ff3..0571acb8 100644 --- a/src/buildtool/common/cli.hpp +++ b/src/buildtool/common/cli.hpp @@ -43,36 +43,36 @@ inline constexpr auto kMaxOpCacheExponent = std::uint8_t{63}; /// \brief Arguments common to all commands. struct CommonArguments { - std::optional<std::filesystem::path> workspace_root{}; - std::optional<std::filesystem::path> repository_config{}; - std::optional<std::string> main{}; + std::optional<std::filesystem::path> workspace_root; + std::optional<std::filesystem::path> repository_config; + std::optional<std::string> main; std::size_t jobs{std::max(1U, std::thread::hardware_concurrency())}; }; struct LogArguments { - std::vector<std::filesystem::path> log_files{}; + std::vector<std::filesystem::path> log_files; LogLevel log_limit{kDefaultLogLevel}; - std::optional<LogLevel> restrict_stderr_log_limit{}; + std::optional<LogLevel> restrict_stderr_log_limit; bool plain_log{false}; bool log_append{false}; }; /// \brief Arguments required for analysing targets. struct AnalysisArguments { - std::optional<std::size_t> expression_log_limit{}; - std::vector<std::string> defines{}; - std::filesystem::path config_file{}; - std::optional<nlohmann::json> target{}; - std::optional<std::string> request_action_input{}; - std::optional<std::string> target_file_name{}; - std::optional<std::string> rule_file_name{}; - std::optional<std::string> expression_file_name{}; - std::optional<std::filesystem::path> target_root{}; - std::optional<std::filesystem::path> rule_root{}; - std::optional<std::filesystem::path> expression_root{}; - std::optional<std::filesystem::path> graph_file{}; - std::optional<std::filesystem::path> artifacts_to_build_file{}; - std::optional<std::filesystem::path> serve_errors_file{}; + std::optional<std::size_t> expression_log_limit; + std::vector<std::string> defines; + std::filesystem::path config_file; + std::optional<nlohmann::json> target; + std::optional<std::string> request_action_input; + std::optional<std::string> target_file_name; + std::optional<std::string> rule_file_name; + std::optional<std::string> expression_file_name; + std::optional<std::filesystem::path> target_root; + std::optional<std::filesystem::path> rule_root; + std::optional<std::filesystem::path> expression_root; + std::optional<std::filesystem::path> graph_file; + std::optional<std::filesystem::path> artifacts_to_build_file; + std::optional<std::filesystem::path> serve_errors_file; }; /// \brief Arguments required for describing targets/rules. @@ -98,10 +98,10 @@ struct DiagnosticArguments { /// \brief Arguments required for specifying build endpoint. struct EndpointArguments { - std::optional<std::filesystem::path> local_root{}; + std::optional<std::filesystem::path> local_root; std::optional<std::string> remote_execution_address; std::vector<std::string> platform_properties; - std::optional<std::filesystem::path> remote_execution_dispatch_file{}; + std::optional<std::filesystem::path> remote_execution_dispatch_file; }; /// \brief Arguments required for building. @@ -122,21 +122,21 @@ struct TCArguments { /// \brief Arguments required for staging. struct StageArguments { - std::filesystem::path output_dir{}; + std::filesystem::path output_dir; bool remember{false}; }; /// \brief Arguments required for rebuilding. struct RebuildArguments { - std::optional<std::string> cache_endpoint{}; - std::optional<std::filesystem::path> dump_flaky{}; + std::optional<std::string> cache_endpoint; + std::optional<std::filesystem::path> dump_flaky; }; /// \brief Arguments for fetching artifacts from CAS. struct FetchArguments { - std::string object_id{}; - std::optional<std::filesystem::path> output_path{}; - std::optional<std::filesystem::path> sub_path{}; + std::string object_id; + std::optional<std::filesystem::path> output_path; + std::optional<std::filesystem::path> sub_path; bool remember{false}; bool raw_tree{}; bool archive{}; @@ -144,9 +144,9 @@ struct FetchArguments { /// \brief Arguments required for running from graph file. struct GraphArguments { - nlohmann::json artifacts{}; - std::filesystem::path graph_file{}; - std::optional<std::filesystem::path> git_cas{}; + nlohmann::json artifacts; + std::filesystem::path graph_file; + std::optional<std::filesystem::path> git_cas; }; // Arguments for authentication methods. @@ -177,10 +177,10 @@ struct ServiceArguments { }; struct ServeArguments { - std::filesystem::path config{}; - std::optional<std::string> remote_serve_address{}; + std::filesystem::path config; + std::optional<std::string> remote_serve_address; // repositories populated from just-serve config file - std::vector<std::filesystem::path> repositories{}; + std::vector<std::filesystem::path> repositories; }; struct GcArguments { @@ -188,7 +188,7 @@ struct GcArguments { }; struct ToAddArguments { - std::filesystem::path location{}; + std::filesystem::path location; bool follow_symlinks{}; }; |