mirror of
https://github.com/etcd-io/etcd.git
synced 2026-02-05 06:46:49 +01:00
Remove verify-license-header check
This is now replaced by the golangci-lint goheader linter. Deletes the bash helper go_srcs_in_module, as it is not used anymore by any other static check functions. Signed-off-by: Ivan Valdes <ivan@vald.es>
This commit is contained in:
7
Makefile
7
Makefile
@@ -96,8 +96,7 @@ fuzz:
|
||||
|
||||
# Static analysis
|
||||
.PHONY: verify
|
||||
verify: verify-bom verify-lint verify-dep verify-shellcheck \
|
||||
verify-license-header verify-mod-tidy \
|
||||
verify: verify-bom verify-lint verify-dep verify-shellcheck verify-mod-tidy \
|
||||
verify-shellws verify-proto-annotations verify-genproto verify-yamllint \
|
||||
verify-markdown-marker verify-go-versions verify-gomodguard \
|
||||
verify-go-workspace
|
||||
@@ -130,10 +129,6 @@ fix-lint:
|
||||
verify-shellcheck:
|
||||
PASSES="shellcheck" ./scripts/test.sh
|
||||
|
||||
.PHONY: verify-license-header
|
||||
verify-license-header:
|
||||
PASSES="license_header" ./scripts/test.sh
|
||||
|
||||
.PHONY: verify-mod-tidy
|
||||
verify-mod-tidy:
|
||||
PASSES="mod_tidy" ./scripts/test.sh
|
||||
|
||||
@@ -410,18 +410,6 @@ function lint_fix_pass {
|
||||
run_for_all_workspace_modules golangci-lint run --config "${ETCD_ROOT_DIR}/tools/.golangci.yaml" --fix
|
||||
}
|
||||
|
||||
function license_header_per_module {
|
||||
# bash 3.x compatible replacement of: mapfile -t gofiles < <(go_srcs_in_module)
|
||||
local gofiles=()
|
||||
while IFS= read -r line; do gofiles+=("$line"); done < <(go_srcs_in_module)
|
||||
run_go_tool "github.com/google/addlicense" --check "${gofiles[@]}"
|
||||
}
|
||||
|
||||
function license_header_pass {
|
||||
run_for_modules generic_checker license_header_per_module
|
||||
}
|
||||
|
||||
|
||||
function bom_pass {
|
||||
log_callout "Checking bill of materials..."
|
||||
# https://github.com/golang/go/commit/7c388cc89c76bc7167287fb488afcaf5a4aa12bf
|
||||
|
||||
@@ -32,12 +32,6 @@ set_root_dir
|
||||
|
||||
#### Discovery of files/packages within a go module #####
|
||||
|
||||
# go_srcs_in_module
|
||||
# returns list of all not-generated go sources in the current (dir) module.
|
||||
function go_srcs_in_module {
|
||||
go list -f "{{with \$c:=.}}{{range \$f:=\$c.GoFiles }}{{\$c.Dir}}/{{\$f}}{{\"\n\"}}{{end}}{{range \$f:=\$c.TestGoFiles }}{{\$c.Dir}}/{{\$f}}{{\"\n\"}}{{end}}{{range \$f:=\$c.XTestGoFiles }}{{\$c.Dir}}/{{\$f}}{{\"\n\"}}{{end}}{{end}}" ./... | grep -vE "(\\.pb\\.go|\\.pb\\.gw.go)"
|
||||
}
|
||||
|
||||
# pkgs_in_module [optional:package_pattern]
|
||||
# returns list of all packages in the current (dir) module.
|
||||
# if the package_pattern is given, its being resolved.
|
||||
|
||||
@@ -10,7 +10,6 @@ require (
|
||||
github.com/cloudflare/cfssl v1.6.5
|
||||
github.com/gogo/protobuf v1.3.2
|
||||
github.com/golangci/golangci-lint/v2 v2.5.0
|
||||
github.com/google/addlicense v1.2.0
|
||||
github.com/google/yamlfmt v0.17.2
|
||||
github.com/grpc-ecosystem/grpc-gateway/v2 v2.27.3
|
||||
github.com/ryancurrah/gomodguard v1.4.1
|
||||
|
||||
@@ -72,7 +72,6 @@ github.com/bkielbasa/cyclop v1.2.3 h1:faIVMIGDIANuGPWH031CZJTi2ymOQBULs9H21HSMa5
|
||||
github.com/bkielbasa/cyclop v1.2.3/go.mod h1:kHTwA9Q0uZqOADdupvcFJQtp/ksSnytRMe8ztxG8Fuo=
|
||||
github.com/blizzy78/varnamelen v0.8.0 h1:oqSblyuQvFsW1hbBHh1zfwrKe3kcSj0rnXkKzsQ089M=
|
||||
github.com/blizzy78/varnamelen v0.8.0/go.mod h1:V9TzQZ4fLJ1DSrjVDfl89H7aMnTvKkApdHeyESmyR7k=
|
||||
github.com/bmatcuk/doublestar/v4 v4.0.2/go.mod h1:xBQ8jztBU6kakFMg+8WGxn0c6z1fTSPVIjEY1Wr7jzc=
|
||||
github.com/bmatcuk/doublestar/v4 v4.8.1 h1:54Bopc5c2cAvhLRAzqOGCYHYyhcDHsFF4wWIR5wKP38=
|
||||
github.com/bmatcuk/doublestar/v4 v4.8.1/go.mod h1:xBQ8jztBU6kakFMg+8WGxn0c6z1fTSPVIjEY1Wr7jzc=
|
||||
github.com/bombsimon/wsl/v4 v4.7.0 h1:1Ilm9JBPRczjyUs6hvOPKvd7VL1Q++PL8M0SXBDf+jQ=
|
||||
@@ -218,8 +217,6 @@ github.com/golangci/swaggoswag v0.0.0-20250504205917-77f2aca3143e h1:ai0EfmVYE2b
|
||||
github.com/golangci/swaggoswag v0.0.0-20250504205917-77f2aca3143e/go.mod h1:Vrn4B5oR9qRwM+f54koyeH3yzphlecwERs0el27Fr/s=
|
||||
github.com/golangci/unconvert v0.0.0-20250410112200-a129a6e6413e h1:gD6P7NEo7Eqtt0ssnqSJNNndxe69DOQ24A5h7+i3KpM=
|
||||
github.com/golangci/unconvert v0.0.0-20250410112200-a129a6e6413e/go.mod h1:h+wZwLjUTJnm/P2rwlbJdRPZXOzaT36/FwnPnY2inzc=
|
||||
github.com/google/addlicense v1.2.0 h1:W+DP4A639JGkcwBGMDvjSurZHvaq2FN0pP7se9czsKA=
|
||||
github.com/google/addlicense v1.2.0/go.mod h1:Sm/DHu7Jk+T5miFHHehdIjbi4M5+dJDRS3Cq0rncIxA=
|
||||
github.com/google/certificate-transparency-go v1.1.8 h1:LGYKkgZF7satzgTak9R4yzfJXEeYVAjV6/EAEJOf1to=
|
||||
github.com/google/certificate-transparency-go v1.1.8/go.mod h1:bV/o8r0TBKRf1X//iiiSgWrvII4d7/8OiA+3vG26gI8=
|
||||
github.com/google/go-cmp v0.5.2/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
|
||||
|
||||
@@ -26,7 +26,6 @@ import (
|
||||
_ "github.com/cloudflare/cfssl/cmd/cfssl"
|
||||
_ "github.com/cloudflare/cfssl/cmd/cfssljson"
|
||||
_ "github.com/golangci/golangci-lint/v2/cmd/golangci-lint"
|
||||
_ "github.com/google/addlicense"
|
||||
_ "github.com/google/yamlfmt/cmd/yamlfmt"
|
||||
_ "github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-grpc-gateway"
|
||||
_ "github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-openapiv2"
|
||||
|
||||
Reference in New Issue
Block a user