From b5971ea7fc9665d00abd629bb165f0a34835d5c9 Mon Sep 17 00:00:00 2001 From: Dominik Schulz Date: Sat, 10 Sep 2022 14:48:59 +0200 Subject: [PATCH] Add license-lint (#2335) Fixes #2332 Signed-off-by: Dominik Schulz Signed-off-by: Dominik Schulz --- .license-lint.yml | 9 +++++++++ Makefile | 8 ++++++++ 2 files changed, 17 insertions(+) create mode 100644 .license-lint.yml diff --git a/.license-lint.yml b/.license-lint.yml new file mode 100644 index 0000000000..fd6a6745cd --- /dev/null +++ b/.license-lint.yml @@ -0,0 +1,9 @@ +unrestricted_licenses: + - Apache-2.0 + - MIT + - BSD-3-Clause + - BSD-2-Clause + - 0BSD +reciprocal_licenses: + - MPL-2.0 + - MPL-2.0-no-copyleft-exception diff --git a/Makefile b/Makefile index 745143d07f..e5e1dedd4c 100644 --- a/Makefile +++ b/Makefile @@ -139,6 +139,14 @@ codequality: @printf '%s\n' '$(OK)' + @echo -n " LICENSE-LINT " + @which license-lint > /dev/null; if [ $$? -ne 0 ]; then \ + $(GO) install istio.io/tools/cmd/license-lint@latest; \ + fi + @license-lint --config .license-lint.yml >/dev/null || exit 1 + + @printf '%s\n' '$(OK)' + gen: @$(GO) generate ./...