Commit 6a3fbac 1 parent 6eeeac2 commit 6a3fbac Copy full SHA for 6a3fbac
File tree 7 files changed +37
-86
lines changed
7 files changed +37
-86
lines changed Original file line number Diff line number Diff line change 1
- issues :
2
- exclude-rules :
3
- - path : pkg/kubefedctl/enable/enable.go
4
- linters :
5
- - unused
6
- - structcheck
7
- - path : pkg/kubefedctl/join.go
8
- linters :
9
- - structcheck
10
- - path : pkg/kubefedctl/disable.go
11
- linters :
12
- - structcheck
1
+ run :
2
+ timeout : 5m
3
+ skip-dirs :
4
+ - third-party
5
+
6
+ linters :
7
+ disable-all : true
8
+ enable :
9
+ - deadcode
10
+ - errcheck
11
+ - goconst
12
+ - gocritic
13
+ - goimports
14
+ - gosimple
15
+ - govet
16
+ - ineffassign
17
+ - nolintlint
18
+ - prealloc
19
+ - staticcheck
20
+ - structcheck
21
+ - stylecheck
22
+ - typecheck
23
+ - unparam
24
+ - unused
25
+ - varcheck
26
+ - whitespace
27
+
28
+ linters-settings :
29
+ goimports :
30
+ local-prefixes : sigs.k8s.io/kubefed
Original file line number Diff line number Diff line change @@ -67,7 +67,7 @@ TEST = $(TEST_CMD) $(TEST_PKGS)
67
67
DOCKER_BUILD ?= $(DOCKER ) run -it --rm -v $(DIR ) :$(BUILDMNT ) -w $(BUILDMNT ) $(BUILD_IMAGE ) /bin/sh -c
68
68
69
69
# TODO (irfanurrehman): can add local compile, and auto-generate targets also if needed
70
- .PHONY : all container push clean hyperfed controller kubefedctl test local-test vet fmt build bindir generate webhook e2e deploy.kind
70
+ .PHONY : all container push clean hyperfed controller kubefedctl test local-test vet lint build bindir generate webhook e2e deploy.kind
71
71
72
72
all : container hyperfed controller kubefedctl webhook e2e
73
73
@@ -80,8 +80,8 @@ build: hyperfed controller kubefedctl webhook
80
80
vet :
81
81
go vet $(TEST_PKGS )
82
82
83
- fmt :
84
- $( shell ./hack/update-gofmt.sh)
83
+ lint :
84
+ golangci-lint run -c .golangci.yml --fix
85
85
86
86
container : $(HYPERFED_TARGET ) -linux-$(HOST_ARCH )
87
87
cp -f $(HYPERFED_TARGET ) -linux-$(HOST_ARCH ) images/kubefed/hyperfed
Load Diff This file was deleted.
Load Diff This file was deleted.
Original file line number Diff line number Diff line change @@ -60,7 +60,7 @@ curl "${curl_args}O" "${helm_url}" \
60
60
&& tar xzfp " ${helm_tgz} " -C " ${dest_dir} " --strip-components=1 " ${platform} -amd64/helm" \
61
61
&& rm " ${helm_tgz} "
62
62
63
- golint_version=" 1.27 .0"
63
+ golint_version=" 1.30 .0"
64
64
golint_dir=" golangci-lint-${golint_version} -${platform} -amd64"
65
65
golint_tgz=" ${golint_dir} .tar.gz"
66
66
golint_url=" https://github.com/golangci/golangci-lint/releases/download/v${golint_version} /${golint_tgz} "
Original file line number Diff line number Diff line change @@ -120,14 +120,12 @@ download-dependencies
120
120
echo " Checking initial state of working tree"
121
121
check-git-state
122
122
123
- echo " Verifying Gofmt"
124
- ./hack/go-tools/verify-gofmt.sh
125
-
126
123
echo " Checking boilerplate text"
127
124
./third-party/k8s.io/repo-infra/hack/verify_boilerplate.py --rootdir=" ${ROOT_DIR} "
128
125
129
126
echo " Linting"
130
- golangci-lint run --timeout=5m
127
+ golangci-lint run -c .golangci.yml --fix
128
+ check-git-state
131
129
132
130
echo " Checking that correct Error Package is used."
133
131
./hack/verify-errpkg.sh
Original file line number Diff line number Diff line change
1
+ checks = ["all"]
You can’t perform that action at this time.
0 commit comments