File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ run :
2+ timeout : 5m
3+ allow-parallel-runners : true
4+
5+ issues :
6+ # don't skip warning about doc comments
7+ # don't exclude the default set of lint
8+ exclude-use-default : false
9+ # restore some of the defaults
10+ # (fill in the rest as needed)
11+ exclude-rules :
12+ - path : " api/*"
13+ linters :
14+ - lll
15+ - path : " pkg/*"
16+ linters :
17+ - dupl
18+ - lll
19+ - path : " test/*"
20+ linters :
21+ - dupl
22+ - lll
23+ linters :
24+ disable-all : true
25+ enable :
26+ - dupl
27+ - errcheck
28+ - exportloopref
29+ - goconst
30+ - gofmt
31+ - goimports
32+ - gosimple
33+ - govet
34+ - ineffassign
35+ - misspell
36+ - nakedret
37+ - prealloc
38+ - staticcheck
39+ - typecheck
40+ - unconvert
41+ - unparam
42+ - unused
Original file line number Diff line number Diff line change @@ -39,6 +39,17 @@ SHELL = /usr/bin/env bash -o pipefail
3939.PHONY : all
4040all : build
4141
42+ LOCALBIN ?= $(shell pwd) /bin
43+ $(LOCALBIN ) :
44+ mkdir -p $(LOCALBIN )
45+
46+ GINKGO = $(shell pwd) /bin/ginkgo
47+ GINKGO_VERSION ?= $(shell go list -m -f '{{.Version}}' github.com/onsi/ginkgo/v2)
48+ .PHONY : ginkgo
49+ ginkgo : # # Download ginkgo locally if necessary.
50+ test -s $(LOCALBIN ) /ginkgo || \
51+ GOBIN=$(LOCALBIN ) go install github.com/onsi/ginkgo/v2/ginkgo@$(GINKGO_VERSION )
52+
4253# #@ General
4354
4455# The help target prints out all targets with their descriptions organized
@@ -84,6 +95,16 @@ gotestsum: ## Download gotestsum locally if necessary.
8495test : fmt vet envtest gotestsum # # Run tests.
8596 $(GOTESTSUM ) --junitfile $(ARTIFACTS ) /junit.xml -- ./api/... ./pkg/... -coverprofile $(ARTIFACTS ) /cover.out
8697
98+ .PHONY : test-integration
99+ test-integration : fmt vet envtest ginkgo # # Run integration tests.
100+ @echo " skip integration test"
101+ # KUBEBUILDER_ASSETS="$(shell $(ENVTEST) use $(ENVTEST_K8S_VERSION) --bin-dir $(LOCALBIN) -p path)" \
102+ # $(GINKGO) --junit-report=junit.xml --output-dir=$(ARTIFACTS) -v $(INTEGRATION_TARGET)
103+
104+ test-e2e : fmt vet envtest ginkgo
105+ @echo " skip e2e test"
106+ # E2E_KIND_NODE_VERSION=$(E2E_KIND_NODE_VERSION) KIND_CLUSTER_NAME=$(KIND_CLUSTER_NAME) KIND=$(KIND) KUBECTL=$(KUBECTL) KUSTOMIZE=$(KUSTOMIZE) GINKGO=$(GINKGO) USE_EXISTING_CLUSTER=$(USE_EXISTING_CLUSTER) IMAGE_TAG=$(IMG) ENVTEST_LWS_VERSION=$(ENVTEST_LWS_VERSION) ./hack/e2e-test.sh
107+
87108GOLANGCI_LINT = $(shell pwd) /bin/golangci-lint
88109GOLANGCI_LINT_VERSION ?= v1.54.2
89110golangci-lint :
You can’t perform that action at this time.
0 commit comments