From f697d8cb3ce80e23137fdbb51a91006ab41056b2 Mon Sep 17 00:00:00 2001 From: "A. Cody Schuffelen" Date: Tue, 4 Feb 2025 13:48:11 -0800 Subject: [PATCH] Add the "clang-tidy" and "clang_tidy" tags ... as suggested by cjreynol@. This enables running ``` bazel build --build_tag_filters="-clang-tidy" "//..." ``` --- base/cvd/cuttlefish/common/libs/fs/BUILD.bazel | 2 ++ base/cvd/cuttlefish/common/libs/utils/BUILD.bazel | 5 +++++ base/cvd/cuttlefish/host/commands/assemble_cvd/BUILD.bazel | 1 + base/cvd/cuttlefish/host/commands/cvd/BUILD.bazel | 2 ++ base/cvd/cuttlefish/host/commands/cvd/acloud/BUILD.bazel | 1 + base/cvd/cuttlefish/host/commands/cvd/cache/BUILD.bazel | 1 + base/cvd/cuttlefish/host/commands/cvd/cli/BUILD.bazel | 6 ++++++ .../cuttlefish/host/commands/cvd/cli/commands/BUILD.bazel | 3 +++ .../cvd/cuttlefish/host/commands/cvd/cli/parser/BUILD.bazel | 2 ++ .../cuttlefish/host/commands/cvd/cli/selector/BUILD.bazel | 2 ++ base/cvd/cuttlefish/host/commands/cvd/fetch/BUILD.bazel | 1 + base/cvd/cuttlefish/host/commands/cvd/instances/BUILD.bazel | 3 +++ base/cvd/cuttlefish/host/commands/cvd/legacy/BUILD.bazel | 1 + base/cvd/cuttlefish/host/commands/cvd/metrics/BUILD.bazel | 1 + .../host/commands/cvd/unittests/fetch/BUILD.bazel | 1 + .../host/commands/cvd/unittests/parser/BUILD.bazel | 1 + .../host/commands/cvd/unittests/selector/BUILD.bazel | 1 + .../host/commands/cvd/unittests/server/BUILD.bazel | 1 + base/cvd/cuttlefish/host/commands/cvd/utils/BUILD.bazel | 1 + .../cuttlefish/host/commands/logcat_receiver/BUILD.bazel | 1 + base/cvd/cuttlefish/host/commands/metrics/BUILD.bazel | 1 + base/cvd/cuttlefish/host/libs/command_util/BUILD.bazel | 1 + base/cvd/cuttlefish/host/libs/config/BUILD.bazel | 1 + base/cvd/cuttlefish/host/libs/directories/BUILD.bazel | 1 + base/cvd/cuttlefish/host/libs/image_aggregator/BUILD.bazel | 1 + base/cvd/cuttlefish/host/libs/web/BUILD.bazel | 2 ++ 26 files changed, 44 insertions(+) diff --git a/base/cvd/cuttlefish/common/libs/fs/BUILD.bazel b/base/cvd/cuttlefish/common/libs/fs/BUILD.bazel index 25c0e47e34..5087d3a566 100644 --- a/base/cvd/cuttlefish/common/libs/fs/BUILD.bazel +++ b/base/cvd/cuttlefish/common/libs/fs/BUILD.bazel @@ -32,6 +32,7 @@ cc_library( clang_tidy_test( name = "fs_clang_tidy", srcs = [":fs"], + tags = ["clang_tidy", "clang-tidy"], ) cc_test( @@ -52,4 +53,5 @@ cc_test( clang_tidy_test( name = "fs_test_clang_tidy", srcs = [":fs_test"], + tags = ["clang_tidy", "clang-tidy"], ) diff --git a/base/cvd/cuttlefish/common/libs/utils/BUILD.bazel b/base/cvd/cuttlefish/common/libs/utils/BUILD.bazel index b3970fa201..3a257f77d9 100644 --- a/base/cvd/cuttlefish/common/libs/utils/BUILD.bazel +++ b/base/cvd/cuttlefish/common/libs/utils/BUILD.bazel @@ -24,6 +24,7 @@ cc_library( clang_tidy_test( name = "result_clang_tidy", srcs = [":result"], + tags = ["clang_tidy", "clang-tidy"], ) cc_library( @@ -44,6 +45,7 @@ cc_library( clang_tidy_test( name = "result_matchers_clang_tidy", srcs = [":result_matchers"], + tags = ["clang_tidy", "clang-tidy"], ) cc_library( @@ -106,6 +108,7 @@ cc_library( clang_tidy_test( name = "utils_clang_tidy", srcs = [":utils"], + tags = ["clang_tidy", "clang-tidy"], ) cc_test( @@ -126,6 +129,7 @@ cc_test( clang_tidy_test( name = "result_test_clang_tidy", srcs = [":result_test"], + tags = ["clang_tidy", "clang-tidy"], ) cc_test( @@ -163,4 +167,5 @@ cc_test( clang_tidy_test( name = "utils_test_clang_tidy", srcs = [":utils_test"], + tags = ["clang_tidy", "clang-tidy"], ) diff --git a/base/cvd/cuttlefish/host/commands/assemble_cvd/BUILD.bazel b/base/cvd/cuttlefish/host/commands/assemble_cvd/BUILD.bazel index 1f9ded4305..aa0eb77f92 100644 --- a/base/cvd/cuttlefish/host/commands/assemble_cvd/BUILD.bazel +++ b/base/cvd/cuttlefish/host/commands/assemble_cvd/BUILD.bazel @@ -20,4 +20,5 @@ cc_library( clang_tidy_test( name = "libassemble_cvd_clang_tidy", srcs = [":libassemble_cvd"], + tags = ["clang_tidy", "clang-tidy"], ) diff --git a/base/cvd/cuttlefish/host/commands/cvd/BUILD.bazel b/base/cvd/cuttlefish/host/commands/cvd/BUILD.bazel index 8b4dfe0ef7..b5e0e1fad1 100644 --- a/base/cvd/cuttlefish/host/commands/cvd/BUILD.bazel +++ b/base/cvd/cuttlefish/host/commands/cvd/BUILD.bazel @@ -28,6 +28,7 @@ cc_library( clang_tidy_test( name = "libcvd_clang_tidy", srcs = [":libcvd"], + tags = ["clang_tidy", "clang-tidy"], ) cc_binary( @@ -49,4 +50,5 @@ cc_binary( clang_tidy_test( name = "cvd_clang_tidy", srcs = [":cvd"], + tags = ["clang_tidy", "clang-tidy"], ) diff --git a/base/cvd/cuttlefish/host/commands/cvd/acloud/BUILD.bazel b/base/cvd/cuttlefish/host/commands/cvd/acloud/BUILD.bazel index 94299caf3d..c6365acf23 100644 --- a/base/cvd/cuttlefish/host/commands/cvd/acloud/BUILD.bazel +++ b/base/cvd/cuttlefish/host/commands/cvd/acloud/BUILD.bazel @@ -50,4 +50,5 @@ cc_library( clang_tidy_test( name = "acloud_clang_tidy", srcs = [":acloud"], + tags = ["clang_tidy", "clang-tidy"], ) diff --git a/base/cvd/cuttlefish/host/commands/cvd/cache/BUILD.bazel b/base/cvd/cuttlefish/host/commands/cvd/cache/BUILD.bazel index 4222a5bee6..185ac78291 100644 --- a/base/cvd/cuttlefish/host/commands/cvd/cache/BUILD.bazel +++ b/base/cvd/cuttlefish/host/commands/cvd/cache/BUILD.bazel @@ -23,4 +23,5 @@ cc_library( clang_tidy_test( name = "cache_clang_tidy", srcs = [":cache"], + tags = ["clang_tidy", "clang-tidy"], ) diff --git a/base/cvd/cuttlefish/host/commands/cvd/cli/BUILD.bazel b/base/cvd/cuttlefish/host/commands/cvd/cli/BUILD.bazel index 1b8a09ea22..6eb3bcb042 100644 --- a/base/cvd/cuttlefish/host/commands/cvd/cli/BUILD.bazel +++ b/base/cvd/cuttlefish/host/commands/cvd/cli/BUILD.bazel @@ -20,6 +20,7 @@ cc_library( clang_tidy_test( name = "command_request_clang_tidy", srcs = [":command_request"], + tags = ["clang_tidy", "clang-tidy"], ) cc_library( @@ -38,6 +39,7 @@ cc_library( clang_tidy_test( name = "frontline_parser_clang_tidy", srcs = [":frontline_parser"], + tags = ["clang_tidy", "clang-tidy"], ) cc_library( @@ -55,6 +57,7 @@ cc_library( clang_tidy_test( name = "interruptible_terminal_clang_tidy", srcs = [":interruptible_terminal"], + tags = ["clang_tidy", "clang-tidy"], ) # Commands that may invoke other commands @@ -105,6 +108,7 @@ cc_library( clang_tidy_test( name = "nesting_commands_clang_tidy", srcs = [":nesting_commands"], + tags = ["clang_tidy", "clang-tidy"], ) cc_library( @@ -116,6 +120,7 @@ cc_library( clang_tidy_test( name = "types_clang_tidy", srcs = [":types"], + tags = ["clang_tidy", "clang-tidy"], ) cc_library( @@ -139,4 +144,5 @@ cc_library( clang_tidy_test( name = "utils_clang_tidy", srcs = [":utils"], + tags = ["clang_tidy", "clang-tidy"], ) diff --git a/base/cvd/cuttlefish/host/commands/cvd/cli/commands/BUILD.bazel b/base/cvd/cuttlefish/host/commands/cvd/cli/commands/BUILD.bazel index 69876ef21a..c7b0859214 100644 --- a/base/cvd/cuttlefish/host/commands/cvd/cli/commands/BUILD.bazel +++ b/base/cvd/cuttlefish/host/commands/cvd/cli/commands/BUILD.bazel @@ -33,6 +33,7 @@ cc_library( clang_tidy_test( name = "command_handler_clang_tidy", srcs = [":command_handler"], + tags = ["clang_tidy", "clang-tidy"], ) cc_library( @@ -52,6 +53,7 @@ cc_library( clang_tidy_test( name = "host_tool_target_clang_tidy", srcs = [":host_tool_target"], + tags = ["clang_tidy", "clang-tidy"], ) # Commands that don't execute other commands @@ -149,5 +151,6 @@ cc_library( clang_tidy_test( name = "leaf_commands_clang_tidy", srcs = [":leaf_commands"], + tags = ["clang_tidy", "clang-tidy"], ) diff --git a/base/cvd/cuttlefish/host/commands/cvd/cli/parser/BUILD.bazel b/base/cvd/cuttlefish/host/commands/cvd/cli/parser/BUILD.bazel index 90a4486ea7..678dfc212e 100644 --- a/base/cvd/cuttlefish/host/commands/cvd/cli/parser/BUILD.bazel +++ b/base/cvd/cuttlefish/host/commands/cvd/cli/parser/BUILD.bazel @@ -32,6 +32,7 @@ cc_library( clang_tidy_test( name = "configs_common_clang_tidy", srcs = [":configs_common"], + tags = ["clang_tidy", "clang-tidy"], ) cc_library( @@ -76,4 +77,5 @@ cc_library( clang_tidy_test( name = "parser_clang_tidy", srcs = [":parser"], + tags = ["clang_tidy", "clang-tidy"], ) 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 c1ac27073d..23e8645779 100644 --- a/base/cvd/cuttlefish/host/commands/cvd/cli/selector/BUILD.bazel +++ b/base/cvd/cuttlefish/host/commands/cvd/cli/selector/BUILD.bazel @@ -40,6 +40,7 @@ cc_library( clang_tidy_test( name = "parser_clang_tidy", srcs = [":parser"], + tags = ["clang_tidy", "clang-tidy"], ) cc_library( @@ -63,4 +64,5 @@ cc_library( clang_tidy_test( name = "selector_clang_tidy", srcs = [":selector"], + tags = ["clang_tidy", "clang-tidy"], ) diff --git a/base/cvd/cuttlefish/host/commands/cvd/fetch/BUILD.bazel b/base/cvd/cuttlefish/host/commands/cvd/fetch/BUILD.bazel index 8251a3ed35..49734c805a 100644 --- a/base/cvd/cuttlefish/host/commands/cvd/fetch/BUILD.bazel +++ b/base/cvd/cuttlefish/host/commands/cvd/fetch/BUILD.bazel @@ -39,4 +39,5 @@ cc_library( clang_tidy_test( name = "fetch_clang_tidy", srcs = [":fetch"], + tags = ["clang_tidy", "clang-tidy"], ) diff --git a/base/cvd/cuttlefish/host/commands/cvd/instances/BUILD.bazel b/base/cvd/cuttlefish/host/commands/cvd/instances/BUILD.bazel index 477fde4382..fb0629877c 100644 --- a/base/cvd/cuttlefish/host/commands/cvd/instances/BUILD.bazel +++ b/base/cvd/cuttlefish/host/commands/cvd/instances/BUILD.bazel @@ -64,6 +64,7 @@ cc_library( clang_tidy_test( name = "instances_clang_tidy", srcs = [":instances"], + tags = ["clang_tidy", "clang-tidy"], ) cc_library( @@ -81,6 +82,7 @@ cc_library( clang_tidy_test( name = "instance_database_utils_clang_tidy", srcs = [":instance_database_utils"], + tags = ["clang_tidy", "clang-tidy"], ) cc_library( @@ -102,4 +104,5 @@ cc_library( clang_tidy_test( name = "reset_client_utils_clang_tidy", srcs = [":reset_client_utils"], + tags = ["clang_tidy", "clang-tidy"], ) diff --git a/base/cvd/cuttlefish/host/commands/cvd/legacy/BUILD.bazel b/base/cvd/cuttlefish/host/commands/cvd/legacy/BUILD.bazel index 88773ae957..a4958ed8f8 100644 --- a/base/cvd/cuttlefish/host/commands/cvd/legacy/BUILD.bazel +++ b/base/cvd/cuttlefish/host/commands/cvd/legacy/BUILD.bazel @@ -43,4 +43,5 @@ cc_library( clang_tidy_test( name = "legacy_clang_tidy", srcs = [":legacy"], + tags = ["clang_tidy", "clang-tidy"], ) diff --git a/base/cvd/cuttlefish/host/commands/cvd/metrics/BUILD.bazel b/base/cvd/cuttlefish/host/commands/cvd/metrics/BUILD.bazel index 0a06119cd6..71fc41b434 100644 --- a/base/cvd/cuttlefish/host/commands/cvd/metrics/BUILD.bazel +++ b/base/cvd/cuttlefish/host/commands/cvd/metrics/BUILD.bazel @@ -21,4 +21,5 @@ cc_library( clang_tidy_test( name = "metrics_clang_tidy", srcs = [":metrics"], + tags = ["clang_tidy", "clang-tidy"], ) diff --git a/base/cvd/cuttlefish/host/commands/cvd/unittests/fetch/BUILD.bazel b/base/cvd/cuttlefish/host/commands/cvd/unittests/fetch/BUILD.bazel index 8bf7411f50..bcbb36ac0d 100644 --- a/base/cvd/cuttlefish/host/commands/cvd/unittests/fetch/BUILD.bazel +++ b/base/cvd/cuttlefish/host/commands/cvd/unittests/fetch/BUILD.bazel @@ -27,4 +27,5 @@ cc_test( clang_tidy_test( name = "fetch_clang_tidy", srcs = [":fetch"], + tags = ["clang_tidy", "clang-tidy"], ) diff --git a/base/cvd/cuttlefish/host/commands/cvd/unittests/parser/BUILD.bazel b/base/cvd/cuttlefish/host/commands/cvd/unittests/parser/BUILD.bazel index b6a6fb6fb3..db35badfb0 100644 --- a/base/cvd/cuttlefish/host/commands/cvd/unittests/parser/BUILD.bazel +++ b/base/cvd/cuttlefish/host/commands/cvd/unittests/parser/BUILD.bazel @@ -39,4 +39,5 @@ cc_test( clang_tidy_test( name = "parser_clang_tidy", srcs = [":parser"], + tags = ["clang_tidy", "clang-tidy"], ) diff --git a/base/cvd/cuttlefish/host/commands/cvd/unittests/selector/BUILD.bazel b/base/cvd/cuttlefish/host/commands/cvd/unittests/selector/BUILD.bazel index 5efa85fe66..a34556b88f 100644 --- a/base/cvd/cuttlefish/host/commands/cvd/unittests/selector/BUILD.bazel +++ b/base/cvd/cuttlefish/host/commands/cvd/unittests/selector/BUILD.bazel @@ -41,4 +41,5 @@ cc_test( clang_tidy_test( name = "selector_clang_tidy", srcs = [":selector"], + tags = ["clang_tidy", "clang-tidy"], ) diff --git a/base/cvd/cuttlefish/host/commands/cvd/unittests/server/BUILD.bazel b/base/cvd/cuttlefish/host/commands/cvd/unittests/server/BUILD.bazel index 02a5aad841..365be201bc 100644 --- a/base/cvd/cuttlefish/host/commands/cvd/unittests/server/BUILD.bazel +++ b/base/cvd/cuttlefish/host/commands/cvd/unittests/server/BUILD.bazel @@ -23,4 +23,5 @@ cc_test( clang_tidy_test( name = "server_clang_tidy", srcs = [":server"], + tags = ["clang_tidy", "clang-tidy"], ) diff --git a/base/cvd/cuttlefish/host/commands/cvd/utils/BUILD.bazel b/base/cvd/cuttlefish/host/commands/cvd/utils/BUILD.bazel index 5725232545..d81809bfcf 100644 --- a/base/cvd/cuttlefish/host/commands/cvd/utils/BUILD.bazel +++ b/base/cvd/cuttlefish/host/commands/cvd/utils/BUILD.bazel @@ -33,4 +33,5 @@ cc_library( clang_tidy_test( name = "utils_clang_tidy", srcs = [":utils"], + tags = ["clang_tidy", "clang-tidy"], ) diff --git a/base/cvd/cuttlefish/host/commands/logcat_receiver/BUILD.bazel b/base/cvd/cuttlefish/host/commands/logcat_receiver/BUILD.bazel index d6ec73b3be..f80b312069 100644 --- a/base/cvd/cuttlefish/host/commands/logcat_receiver/BUILD.bazel +++ b/base/cvd/cuttlefish/host/commands/logcat_receiver/BUILD.bazel @@ -22,4 +22,5 @@ cc_binary( clang_tidy_test( name = "logcat_receiver_clang_tidy", srcs = [":logcat_receiver"], + tags = ["clang_tidy", "clang-tidy"], ) diff --git a/base/cvd/cuttlefish/host/commands/metrics/BUILD.bazel b/base/cvd/cuttlefish/host/commands/metrics/BUILD.bazel index 98674bc425..f0a8034e8a 100644 --- a/base/cvd/cuttlefish/host/commands/metrics/BUILD.bazel +++ b/base/cvd/cuttlefish/host/commands/metrics/BUILD.bazel @@ -17,4 +17,5 @@ cc_library( clang_tidy_test( name = "libmetrics_clang_tidy", srcs = [":libmetrics"], + tags = ["clang_tidy", "clang-tidy"], ) diff --git a/base/cvd/cuttlefish/host/libs/command_util/BUILD.bazel b/base/cvd/cuttlefish/host/libs/command_util/BUILD.bazel index 64072a7495..a5bbec2a59 100644 --- a/base/cvd/cuttlefish/host/libs/command_util/BUILD.bazel +++ b/base/cvd/cuttlefish/host/libs/command_util/BUILD.bazel @@ -32,4 +32,5 @@ cc_library( clang_tidy_test( name = "command_util_clang_tidy", srcs = [":command_util"], + tags = ["clang_tidy", "clang-tidy"], ) diff --git a/base/cvd/cuttlefish/host/libs/config/BUILD.bazel b/base/cvd/cuttlefish/host/libs/config/BUILD.bazel index 93725f021d..4d2f4660e6 100644 --- a/base/cvd/cuttlefish/host/libs/config/BUILD.bazel +++ b/base/cvd/cuttlefish/host/libs/config/BUILD.bazel @@ -43,4 +43,5 @@ cc_library( clang_tidy_test( name = "config_clang_tidy", srcs = [":config"], + tags = ["clang_tidy", "clang-tidy"], ) diff --git a/base/cvd/cuttlefish/host/libs/directories/BUILD.bazel b/base/cvd/cuttlefish/host/libs/directories/BUILD.bazel index 5ab00f6406..231c8651c4 100644 --- a/base/cvd/cuttlefish/host/libs/directories/BUILD.bazel +++ b/base/cvd/cuttlefish/host/libs/directories/BUILD.bazel @@ -26,4 +26,5 @@ cc_library( clang_tidy_test( name = "directories_clang_tidy", srcs = [":directories"], + tags = ["clang_tidy", "clang-tidy"], ) diff --git a/base/cvd/cuttlefish/host/libs/image_aggregator/BUILD.bazel b/base/cvd/cuttlefish/host/libs/image_aggregator/BUILD.bazel index 975fc71f2d..7decbab064 100644 --- a/base/cvd/cuttlefish/host/libs/image_aggregator/BUILD.bazel +++ b/base/cvd/cuttlefish/host/libs/image_aggregator/BUILD.bazel @@ -26,4 +26,5 @@ cc_library( clang_tidy_test( name = "image_aggregator_clang_tidy", srcs = [":image_aggregator"], + tags = ["clang_tidy", "clang-tidy"], ) diff --git a/base/cvd/cuttlefish/host/libs/web/BUILD.bazel b/base/cvd/cuttlefish/host/libs/web/BUILD.bazel index 382f9b3465..3494223720 100644 --- a/base/cvd/cuttlefish/host/libs/web/BUILD.bazel +++ b/base/cvd/cuttlefish/host/libs/web/BUILD.bazel @@ -53,6 +53,7 @@ cc_library( clang_tidy_test( name = "web_clang_tidy", srcs = [":web"], + tags = ["clang_tidy", "clang-tidy"], ) cc_test( @@ -81,4 +82,5 @@ cc_test( clang_tidy_test( name = "web_test_clang_tidy", srcs = [":web_test"], + tags = ["clang_tidy", "clang-tidy"], )