From 89e60d97919031ddfe48d2a7462c5b5527a8140a Mon Sep 17 00:00:00 2001 From: Michael Carroll Date: Fri, 8 Mar 2024 21:06:48 +0000 Subject: [PATCH] More bazel linting Signed-off-by: Michael Carroll --- BUILD.bazel | 4 ++++ av/BUILD.bazel | 10 ++++++++-- events/BUILD.bazel | 11 ++++++++++- geospatial/BUILD.bazel | 11 ++++++++++- graphics/BUILD.bazel | 10 ++++++++-- io/BUILD.bazel | 10 ++++++++-- profiler/BUILD.bazel | 11 +++++++++++ testing/BUILD.bazel | 10 ++++++++-- 8 files changed, 67 insertions(+), 10 deletions(-) diff --git a/BUILD.bazel b/BUILD.bazel index 0107b472..6ead44f5 100644 --- a/BUILD.bazel +++ b/BUILD.bazel @@ -7,6 +7,10 @@ load( "gz_export_header", "gz_include_header", ) +load( + "@gz//bazel/lint:lint.bzl", + "add_lint_tests", +) load("@rules_license//rules:license.bzl", "license") package( diff --git a/av/BUILD.bazel b/av/BUILD.bazel index 7ff8967b..8f833d54 100644 --- a/av/BUILD.bazel +++ b/av/BUILD.bazel @@ -6,10 +6,14 @@ load( "gz_export_header", "gz_include_header", ) +load( + "@gz//bazel/lint:lint.bzl", + "add_lint_tests", +) package( - default_applicable_licenses = [GZ_ROOT + "common:license"], - features = GZ_FEATURES + default_applicable_licenses = [GZ_ROOT + "common:license"], + features = GZ_FEATURES, ) public_headers_no_gen = glob([ @@ -74,3 +78,5 @@ cc_library( "@gtest//:gtest_main", ], ) for src in test_sources] + +add_lint_tests() diff --git a/events/BUILD.bazel b/events/BUILD.bazel index f401c4e7..23af24c1 100644 --- a/events/BUILD.bazel +++ b/events/BUILD.bazel @@ -6,8 +6,15 @@ load( "gz_export_header", "gz_include_header", ) +load( + "@gz//bazel/lint:lint.bzl", + "add_lint_tests", +) -package(features = GZ_FEATURES) +package( + default_applicable_licenses = [GZ_ROOT + "common:license"], + features = GZ_FEATURES, +) public_headers_no_gen = glob([ "include/gz/common/*.hh", @@ -62,3 +69,5 @@ cc_library( "@gtest//:gtest_main", ], ) for src in test_sources] + +add_lint_tests() diff --git a/geospatial/BUILD.bazel b/geospatial/BUILD.bazel index 898703fd..5ca2c4d9 100644 --- a/geospatial/BUILD.bazel +++ b/geospatial/BUILD.bazel @@ -6,8 +6,15 @@ load( "gz_export_header", "gz_include_header", ) +load( + "@gz//bazel/lint:lint.bzl", + "add_lint_tests", +) -package(features = GZ_FEATURES) +package( + default_applicable_licenses = [GZ_ROOT + "common:license"], + features = GZ_FEATURES, +) public_headers_no_gen = glob([ "include/gz/common/*.hh", @@ -69,3 +76,5 @@ cc_library( "@gtest//:gtest_main", ], ) for src in test_sources] + +add_lint_tests() diff --git a/graphics/BUILD.bazel b/graphics/BUILD.bazel index c2fbf61f..bd3bb1a0 100644 --- a/graphics/BUILD.bazel +++ b/graphics/BUILD.bazel @@ -6,10 +6,14 @@ load( "gz_export_header", "gz_include_header", ) +load( + "@gz//bazel/lint:lint.bzl", + "add_lint_tests", +) package( - default_applicable_licenses = [GZ_ROOT + "common:license"], - features = GZ_FEATURES + default_applicable_licenses = [GZ_ROOT + "common:license"], + features = GZ_FEATURES, ) public_headers_no_gen = glob([ @@ -76,3 +80,5 @@ cc_library( "@gtest//:gtest_main", ], ) for src in test_sources] + +add_lint_tests() diff --git a/io/BUILD.bazel b/io/BUILD.bazel index de642964..5e56e9b5 100644 --- a/io/BUILD.bazel +++ b/io/BUILD.bazel @@ -6,10 +6,14 @@ load( "gz_export_header", "gz_include_header", ) +load( + "@gz//bazel/lint:lint.bzl", + "add_lint_tests", +) package( - default_applicable_licenses = [GZ_ROOT + "common:license"], - features = GZ_FEATURES + default_applicable_licenses = [GZ_ROOT + "common:license"], + features = GZ_FEATURES, ) public_headers_no_gen = glob([ @@ -69,3 +73,5 @@ cc_library( "@gtest//:gtest_main", ], ) for src in test_sources] + +add_lint_tests() diff --git a/profiler/BUILD.bazel b/profiler/BUILD.bazel index 442be198..832750e8 100644 --- a/profiler/BUILD.bazel +++ b/profiler/BUILD.bazel @@ -7,6 +7,15 @@ load( "gz_export_header", "gz_include_header", ) +load( + "@gz//bazel/lint:lint.bzl", + "add_lint_tests", +) + +package( + default_applicable_licenses = [GZ_ROOT + "common:license"], + features = GZ_FEATURES, +) # Configuration for UNIX RMT_ENABLED = 1 @@ -118,3 +127,5 @@ cc_test( "@gtest//:gtest_main", ], ) + +add_lint_tests() diff --git a/testing/BUILD.bazel b/testing/BUILD.bazel index 8b5c51a0..c81fac89 100644 --- a/testing/BUILD.bazel +++ b/testing/BUILD.bazel @@ -4,10 +4,14 @@ load( "GZ_ROOT", "gz_export_header", ) +load( + "@gz//bazel/lint:lint.bzl", + "add_lint_tests", +) package( - default_applicable_licenses = [GZ_ROOT + "common:license"], - features = GZ_FEATURES + default_applicable_licenses = [GZ_ROOT + "common:license"], + features = GZ_FEATURES, ) gz_export_header( @@ -73,3 +77,5 @@ cc_test( "@gtest//:gtest_main", ], ) + +add_lint_tests()