File tree Expand file tree Collapse file tree 5 files changed +12
-17
lines changed Expand file tree Collapse file tree 5 files changed +12
-17
lines changed Original file line number Diff line number Diff line change 6
6
settings :
7
7
custom :
8
8
kubeapilinter :
9
- type : module
9
+ path : tools/_output/bin/kube-api-linter.so
10
10
description : kubeapilinter is the Kube-API-Linter and lints Kube like APIs based on API conventions and best practices.
11
11
settings :
12
12
linters :
Original file line number Diff line number Diff line change @@ -4,8 +4,8 @@ source "$(dirname "${BASH_SOURCE}")/lib/init.sh"
4
4
5
5
# Build codegen-crds when it's not present and not overriden for a specific file.
6
6
if [ -z " ${GOLANGCI_LINT:- } " ]; then
7
- ${TOOLS_MAKE} golangci-kube-api-linter
8
- GOLANGCI_LINT=" ${TOOLS_OUTPUT} /golangci-kube-api-linter "
7
+ ${TOOLS_MAKE} golangci-lint kube-api-linter
8
+ GOLANGCI_LINT=" ${TOOLS_OUTPUT} /golangci-lint "
9
9
fi
10
10
11
11
# In CI, HOME is set to / and is not writable.
Load Diff This file was deleted.
Original file line number Diff line number Diff line change @@ -57,8 +57,11 @@ deepcopy-gen: $(OUTPUT_DIR)/deepcopy-gen
57
57
.PHONY :go-to-protobuf
58
58
go-to-protobuf : $(OUTPUT_DIR ) /go-to-protobuf
59
59
60
- .PHONY :golangci-kube-api-linter
61
- golangci-kube-api-linter : $(OUTPUT_DIR ) /golangci-kube-api-linter
60
+ .PHONY :golangci-lint
61
+ golangci-lint : $(OUTPUT_DIR ) /golangci-lint
62
+
63
+ .PHONY :kube-api-linter
64
+ kube-api-linter : $(OUTPUT_DIR ) /kube-api-linter.so
62
65
63
66
.PHONY :openapi-gen
64
67
openapi-gen : $(OUTPUT_DIR ) /openapi-gen
@@ -107,11 +110,9 @@ $(OUTPUT_DIR)/go-to-protobuf: $(OUTPUT_DIR)/vendor-version
107
110
$(OUTPUT_DIR ) /golangci-lint : $(OUTPUT_DIR ) /vendor-version
108
111
go build -mod=vendor -o $(OUTPUT_DIR ) /golangci-lint ./vendor/github.com/golangci/golangci-lint/v2/cmd/golangci-lint
109
112
110
- # The golangci-lint custom command relies on finding a module, this uses a workaround to init the go.mod in the kal directory.
111
- $(OUTPUT_DIR ) /golangci-kube-api-linter : $(OUTPUT_DIR ) /vendor-version $(OUTPUT_DIR ) /golangci-lint
112
- GOFLAGS=-mod=readonly $(OUTPUT_DIR ) /golangci-lint custom
113
- @ mv bin/golangci-kube-api-linter $(OUTPUT_DIR ) /golangci-kube-api-linter
114
- @ rmdir bin
113
+ $(OUTPUT_DIR ) /kube-api-linter.so : $(OUTPUT_DIR ) /vendor-version
114
+ go build -mod=vendor -buildmode=plugin -o $(OUTPUT_DIR ) /kube-api-linter.so ./vendor/sigs.k8s.io/kube-api-linter/pkg/plugin
115
+ ln -fs $(OUTPUT_DIR ) /kube-api-linter.so $(TOOLS_DIR ) /_output/bin/kube-api-linter.so
115
116
116
117
$(OUTPUT_DIR ) /openapi-gen : $(OUTPUT_DIR ) /vendor-version
117
118
go build -mod=vendor -o $(OUTPUT_DIR ) /openapi-gen ./vendor/k8s.io/code-generator/cmd/openapi-gen
Original file line number Diff line number Diff line change @@ -15,5 +15,5 @@ import (
15
15
_ "k8s.io/code-generator/cmd/go-to-protobuf/protoc-gen-gogo"
16
16
_ "k8s.io/code-generator/cmd/prerelease-lifecycle-gen"
17
17
_ "sigs.k8s.io/controller-tools/cmd/controller-gen"
18
- _ "sigs.k8s.io/kube-api-linter"
18
+ _ "sigs.k8s.io/kube-api-linter/pkg/plugin "
19
19
)
You can’t perform that action at this time.
0 commit comments