Re-add `licenses()` - internal license checker still requires it :/ (#506)

And take the opportunity to fix default_applicable_licenses in the gazelle plugin
This commit is contained in:
Alexandre Rostovtsev 2024-05-02 14:38:05 -04:00 committed by GitHub
parent a16ebb4dca
commit 0d43695bd5
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
17 changed files with 35 additions and 1 deletions

2
BUILD
View File

@ -12,6 +12,8 @@ license(
license_kinds = ["@rules_license//licenses/spdx:Apache-2.0"],
)
licenses(["notice"])
# buildifier: disable=skylark-comment
# gazelle:exclude skylark_library.bzl

View File

@ -8,6 +8,8 @@ package(
default_visibility = ["//visibility:private"],
)
licenses(["notice"])
remove_internal_only(
name = "distro_workspace",
src = "//:WORKSPACE",

View File

@ -2,6 +2,8 @@ load("//docs/private:stardoc_with_diff_test.bzl", "stardoc_with_diff_test", "upd
package(default_applicable_licenses = ["//:license"])
licenses(["notice"])
stardoc_with_diff_test(
name = "analysis_test",
bzl_library_target = "//rules:analysis_test",

View File

@ -1,3 +1,5 @@
# This package only contains source targets
package(default_applicable_licenses = ["//:license"])
licenses(["notice"])

View File

@ -1,7 +1,7 @@
load("@bazel_skylib//:bzl_library.bzl", "bzl_library")
load("@rules_license//rules:license.bzl", "license")
package(default_applicable_licenses = ["@bazel_skylib//:license"])
package(default_applicable_licenses = ["//:license"])
license(
name = "license",
@ -9,6 +9,8 @@ license(
license_kinds = ["@rules_license//licenses/spdx:Apache-2.0"],
)
licenses(["notice"])
exports_files(["WORKSPACE.bzlmod"])
bzl_library(

View File

@ -5,6 +5,8 @@ package(
default_visibility = ["//visibility:public"],
)
licenses(["notice"])
# export bzl files for the documentation
exports_files(
glob(["*.bzl"]),

View File

@ -5,6 +5,8 @@ package(
default_visibility = ["//visibility:public"],
)
licenses(["notice"])
bzl_library(
name = "analysis_test",
srcs = ["analysis_test.bzl"],

View File

@ -2,6 +2,8 @@ load("//:bzl_library.bzl", "bzl_library")
package(default_applicable_licenses = ["//:license"])
licenses(["notice"])
bzl_library(
name = "copy_common",
srcs = ["copy_common.bzl"],

View File

@ -20,6 +20,8 @@ package(
default_testonly = 1,
)
licenses(["notice"])
exports_files(
["unittest.bash"],
visibility = ["//tests:__subpackages__"],

View File

@ -6,6 +6,8 @@ package(
default_testonly = 1,
)
licenses(["notice"])
filegroup(
name = "a",
srcs = ["testdata/a.bzl"],

View File

@ -5,6 +5,8 @@ package(
default_testonly = 1,
)
licenses(["notice"])
int_flag(
name = "my_int_flag",
build_setting_default = 42,

View File

@ -8,6 +8,8 @@ package(
default_testonly = 1,
)
licenses(["notice"])
# Copy of directory containing files a and b, and a subdir containing c
copy_directory(
name = "copy_of_dir_with_subdir",

View File

@ -38,6 +38,8 @@ package(
default_testonly = 1,
)
licenses(["notice"])
sh_test(
name = "copy_file_tests",
srcs = ["copy_file_tests.sh"],

View File

@ -7,6 +7,8 @@ package(
default_testonly = 1,
)
licenses(["notice"])
sh_test(
name = "diff_test_tests",
srcs = ["diff_test_tests.sh"],

View File

@ -6,6 +6,8 @@ package(
default_testonly = 1,
)
licenses(["notice"])
filegroup(
name = "fg",
srcs = [

View File

@ -40,6 +40,8 @@ package(
default_testonly = 1,
)
licenses(["notice"])
sh_test(
name = "write_file_tests",
srcs = ["write_file_tests.sh"],

View File

@ -2,6 +2,8 @@ load("//lib:unittest.bzl", "TOOLCHAIN_TYPE", "unittest_toolchain")
package(default_applicable_licenses = ["//:license"])
licenses(["notice"])
toolchain_type(
name = "toolchain_type",
visibility = ["//visibility:public"],