From 9f70c992c340d91936563572780793e96591dbe5 Mon Sep 17 00:00:00 2001 From: "A. Cody Schuffelen" Date: Fri, 28 Aug 2026 15:11:32 -0700 Subject: [PATCH] misc-include-cleaner for cli/selector Bug: b/523396865 --- .../host/commands/cvd/cli/selector/BUILD.bazel | 14 ++++++-------- .../cvd/cli/selector/creation_analyzer.cpp | 5 ++++- .../commands/cvd/cli/selector/creation_analyzer.h | 2 +- .../cvd/cli/selector/host_tool_target_test.cpp | 1 + .../cvd/cli/selector/num_instances_parser.cpp | 1 + .../cvd/cli/selector/num_instances_parser_test.cpp | 8 ++++++++ .../host/commands/cvd/cli/selector/selector.cpp | 8 +++++++- .../host/commands/cvd/cli/selector/selector.h | 2 +- .../cvd/cli/selector/selector_common_parser.cpp | 2 -- 9 files changed, 29 insertions(+), 14 deletions(-) diff --git a/base/cvd/cuttlefish/host/commands/cvd/cli/selector/BUILD.bazel b/base/cvd/cuttlefish/host/commands/cvd/cli/selector/BUILD.bazel index dd7fc8147e2..89e6ecf312b 100644 --- a/base/cvd/cuttlefish/host/commands/cvd/cli/selector/BUILD.bazel +++ b/base/cvd/cuttlefish/host/commands/cvd/cli/selector/BUILD.bazel @@ -10,7 +10,6 @@ cf_cc_library( name = "creation_analyzer", srcs = ["creation_analyzer.cpp"], hdrs = ["creation_analyzer.h"], - include_cleaner_enabled = False, deps = [ "//cuttlefish/common/libs/utils:files", "//cuttlefish/common/libs/utils:users", @@ -18,7 +17,8 @@ cf_cc_library( "//cuttlefish/host/commands/cvd/cli/selector:selector_common_parser", "//cuttlefish/host/commands/cvd/instances:instance_manager", "//cuttlefish/host/commands/cvd/utils:common", - "//cuttlefish/result", + "//cuttlefish/result:expect", + "//cuttlefish/result:result_type", "@abseil-cpp//absl/log", "@abseil-cpp//absl/strings", ], @@ -27,7 +27,6 @@ cf_cc_library( cf_cc_test( name = "host_tool_target_test", srcs = ["host_tool_target_test.cpp"], - include_cleaner_enabled = False, deps = [ "//cuttlefish/common/libs/utils:environment", "//cuttlefish/host/commands/cvd/cli/commands:host_tool_target", @@ -39,7 +38,6 @@ cf_cc_library( name = "num_instances_parser", srcs = ["num_instances_parser.cpp"], hdrs = ["num_instances_parser.h"], - include_cleaner_enabled = False, deps = [ ":selector_common_parser", "//cuttlefish/flag_parser", @@ -50,12 +48,12 @@ cf_cc_library( cf_cc_test( name = "num_instances_parser_test", srcs = ["num_instances_parser_test.cpp"], - include_cleaner_enabled = False, deps = [ ":num_instances_parser", ":selector_common_parser", "//cuttlefish/flag_parser", "//cuttlefish/result:result_matchers", + "//cuttlefish/result:result_type", ], ) @@ -63,14 +61,15 @@ cf_cc_library( name = "selector", srcs = ["selector.cpp"], hdrs = ["selector.h"], - include_cleaner_enabled = False, deps = [ "//cuttlefish/ansi_codes:terminal_colors", "//cuttlefish/host/commands/cvd/cli:command_request", "//cuttlefish/host/commands/cvd/cli:interruptible_terminal", + "//cuttlefish/host/commands/cvd/cli/selector:selector_common_parser", "//cuttlefish/host/commands/cvd/instances", "//cuttlefish/host/commands/cvd/instances:instance_manager", - "//cuttlefish/result", + "//cuttlefish/result:expect", + "//cuttlefish/result:result_type", "@abseil-cpp//absl/strings", "@fmt", ], @@ -80,7 +79,6 @@ cf_cc_library( name = "selector_common_parser", srcs = ["selector_common_parser.cpp"], hdrs = ["selector_common_parser.h"], - include_cleaner_enabled = False, deps = [ "//cuttlefish/common/libs/utils:contains", "//cuttlefish/flag_parser", diff --git a/base/cvd/cuttlefish/host/commands/cvd/cli/selector/creation_analyzer.cpp b/base/cvd/cuttlefish/host/commands/cvd/cli/selector/creation_analyzer.cpp index a2ba59fe952..ee967de8554 100644 --- a/base/cvd/cuttlefish/host/commands/cvd/cli/selector/creation_analyzer.cpp +++ b/base/cvd/cuttlefish/host/commands/cvd/cli/selector/creation_analyzer.cpp @@ -16,7 +16,7 @@ #include "cuttlefish/host/commands/cvd/cli/selector/creation_analyzer.h" -#include +#include #include #include @@ -30,7 +30,10 @@ #include "cuttlefish/common/libs/utils/files.h" #include "cuttlefish/common/libs/utils/users.h" #include "cuttlefish/host/commands/cvd/cli/utils.h" +#include "cuttlefish/host/commands/cvd/instances/instance_manager.h" #include "cuttlefish/host/commands/cvd/utils/common.h" +#include "cuttlefish/result/expect.h" +#include "cuttlefish/result/result_type.h" namespace cuttlefish { namespace selector { diff --git a/base/cvd/cuttlefish/host/commands/cvd/cli/selector/creation_analyzer.h b/base/cvd/cuttlefish/host/commands/cvd/cli/selector/creation_analyzer.h index a4749e00791..b9f13d5c70a 100644 --- a/base/cvd/cuttlefish/host/commands/cvd/cli/selector/creation_analyzer.h +++ b/base/cvd/cuttlefish/host/commands/cvd/cli/selector/creation_analyzer.h @@ -23,7 +23,7 @@ #include "cuttlefish/host/commands/cvd/cli/selector/selector_common_parser.h" #include "cuttlefish/host/commands/cvd/instances/instance_manager.h" -#include "cuttlefish/result/result.h" +#include "cuttlefish/result/result_type.h" namespace cuttlefish { namespace selector { diff --git a/base/cvd/cuttlefish/host/commands/cvd/cli/selector/host_tool_target_test.cpp b/base/cvd/cuttlefish/host/commands/cvd/cli/selector/host_tool_target_test.cpp index 46c6f286c36..f29003a7f7f 100644 --- a/base/cvd/cuttlefish/host/commands/cvd/cli/selector/host_tool_target_test.cpp +++ b/base/cvd/cuttlefish/host/commands/cvd/cli/selector/host_tool_target_test.cpp @@ -17,6 +17,7 @@ #include +#include "gmock/gmock.h" #include "gtest/gtest.h" #include "cuttlefish/common/libs/utils/environment.h" diff --git a/base/cvd/cuttlefish/host/commands/cvd/cli/selector/num_instances_parser.cpp b/base/cvd/cuttlefish/host/commands/cvd/cli/selector/num_instances_parser.cpp index f733b5896d1..b101fa3a00a 100644 --- a/base/cvd/cuttlefish/host/commands/cvd/cli/selector/num_instances_parser.cpp +++ b/base/cvd/cuttlefish/host/commands/cvd/cli/selector/num_instances_parser.cpp @@ -16,6 +16,7 @@ #include "cuttlefish/host/commands/cvd/cli/selector/num_instances_parser.h" +#include #include #include diff --git a/base/cvd/cuttlefish/host/commands/cvd/cli/selector/num_instances_parser_test.cpp b/base/cvd/cuttlefish/host/commands/cvd/cli/selector/num_instances_parser_test.cpp index 71dc402b43b..6bb99143eda 100644 --- a/base/cvd/cuttlefish/host/commands/cvd/cli/selector/num_instances_parser_test.cpp +++ b/base/cvd/cuttlefish/host/commands/cvd/cli/selector/num_instances_parser_test.cpp @@ -16,11 +16,19 @@ #include "cuttlefish/host/commands/cvd/cli/selector/num_instances_parser.h" +#include + +#include +#include +#include + +#include "gmock/gmock.h" #include "gtest/gtest.h" #include "cuttlefish/flag_parser/flag.h" #include "cuttlefish/host/commands/cvd/cli/selector/selector_common_parser.h" #include "cuttlefish/result/result_matchers.h" +#include "cuttlefish/result/result_type.h" namespace cuttlefish { namespace selector { diff --git a/base/cvd/cuttlefish/host/commands/cvd/cli/selector/selector.cpp b/base/cvd/cuttlefish/host/commands/cvd/cli/selector/selector.cpp index db368baa657..a140db4f0c1 100644 --- a/base/cvd/cuttlefish/host/commands/cvd/cli/selector/selector.cpp +++ b/base/cvd/cuttlefish/host/commands/cvd/cli/selector/selector.cpp @@ -16,6 +16,8 @@ #include "cuttlefish/host/commands/cvd/cli/selector/selector.h" +#include + #include #include #include @@ -26,15 +28,19 @@ #include "absl/strings/numbers.h" #include "fmt/base.h" -#include "fmt/format.h" #include "fmt/ostream.h" #include "cuttlefish/ansi_codes/terminal_colors.h" #include "cuttlefish/host/commands/cvd/cli/command_request.h" #include "cuttlefish/host/commands/cvd/cli/interruptible_terminal.h" +#include "cuttlefish/host/commands/cvd/cli/selector/selector_common_parser.h" +#include "cuttlefish/host/commands/cvd/instances/instance_database_types.h" +#include "cuttlefish/host/commands/cvd/instances/instance_manager.h" #include "cuttlefish/host/commands/cvd/instances/local_instance.h" #include "cuttlefish/host/commands/cvd/instances/local_instance_group.h" #include "cuttlefish/host/commands/cvd/instances/status_fetcher.h" +#include "cuttlefish/result/expect.h" +#include "cuttlefish/result/result_type.h" namespace cuttlefish { namespace selector { diff --git a/base/cvd/cuttlefish/host/commands/cvd/cli/selector/selector.h b/base/cvd/cuttlefish/host/commands/cvd/cli/selector/selector.h index e352338f6fe..93ad509382a 100644 --- a/base/cvd/cuttlefish/host/commands/cvd/cli/selector/selector.h +++ b/base/cvd/cuttlefish/host/commands/cvd/cli/selector/selector.h @@ -22,7 +22,7 @@ #include "cuttlefish/host/commands/cvd/instances/instance_manager.h" #include "cuttlefish/host/commands/cvd/instances/local_instance.h" #include "cuttlefish/host/commands/cvd/instances/local_instance_group.h" -#include "cuttlefish/result/result.h" +#include "cuttlefish/result/result_type.h" namespace cuttlefish { namespace selector { diff --git a/base/cvd/cuttlefish/host/commands/cvd/cli/selector/selector_common_parser.cpp b/base/cvd/cuttlefish/host/commands/cvd/cli/selector/selector_common_parser.cpp index 77874d3c9ac..2b507472214 100644 --- a/base/cvd/cuttlefish/host/commands/cvd/cli/selector/selector_common_parser.cpp +++ b/base/cvd/cuttlefish/host/commands/cvd/cli/selector/selector_common_parser.cpp @@ -16,8 +16,6 @@ #include "cuttlefish/host/commands/cvd/cli/selector/selector_common_parser.h" -#include - #include #include #include