mirror of
https://github.com/hanzoai/visor.git
synced 2026-09-24 17:04:14 +00:00
This adds a tool to pull in and analyze the licenses of all dependencies in the project, and ensures they are in a set of allowed licenses. This ensures that if we add new deps down the line, they must be part of the set of allowed licenses.
32 lines
774 B
Python
32 lines
774 B
Python
load("//tools:defs.bzl", "go_library", "go_test")
|
|
|
|
package(
|
|
default_applicable_licenses = ["//:license"],
|
|
licenses = ["notice"],
|
|
)
|
|
|
|
go_library(
|
|
name = "licensecheck",
|
|
srcs = ["licensecheck.go"],
|
|
marshal = False,
|
|
stateify = False,
|
|
visibility = ["//tools/licensecheck:__subpackages__"],
|
|
deps = [
|
|
"@in_gopkg_yaml_v3//:go_default_library",
|
|
"@org_golang_x_mod//modfile:go_default_library",
|
|
"@org_golang_x_mod//module:go_default_library",
|
|
"@org_golang_x_mod//semver:go_default_library",
|
|
],
|
|
)
|
|
|
|
go_test(
|
|
name = "licensecheck_test",
|
|
size = "small",
|
|
srcs = ["licensecheck_test.go"],
|
|
data = [
|
|
"dependencies.yaml",
|
|
"//governance:licensing.yaml",
|
|
],
|
|
library = ":licensecheck",
|
|
)
|