Skip to content

Commit aede36a

Browse files
committed
Update golangci-lint to v1.54.2
Signed-off-by: Marvin Beckers <[email protected]>
1 parent b489010 commit aede36a

File tree

3 files changed

+45
-7
lines changed

3 files changed

+45
-7
lines changed

.golangci.yaml

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
run:
2+
timeout: 10m
3+
allow-parallel-runners: true
4+
5+
linters:
6+
disable-all: true
7+
enable:
8+
- asasalint
9+
- asciicheck
10+
- bidichk
11+
- bodyclose
12+
- containedctx
13+
- dupword
14+
- durationcheck
15+
- errcheck
16+
- errchkjson
17+
- exportloopref
18+
- gocritic
19+
- godot
20+
- gofmt
21+
- goprintffuncname
22+
- gosec
23+
- gosimple
24+
- govet
25+
- importas
26+
- ineffassign
27+
- misspell
28+
- nilerr
29+
- noctx
30+
- nolintlint
31+
- nosprintfhostport
32+
- prealloc
33+
- revive
34+
- staticcheck
35+
- unconvert
36+
- unused
37+
- usestdlibvars
38+
- whitespace

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ CONTROLLER_GEN_BIN := controller-gen
2525
CONTROLLER_GEN := $(GOBIN_DIR)/$(CONTROLLER_GEN_BIN)-$(CONTROLLER_GEN_VER)
2626
export CONTROLLER_GEN
2727

28-
GOLANGCI_LINT_VER := v1.49.0
28+
GOLANGCI_LINT_VER := v1.54.2
2929
GOLANGCI_LINT_BIN := golangci-lint
3030
GOLANGCI_LINT := $(GOBIN_DIR)/$(GOLANGCI_LINT_BIN)-$(GOLANGCI_LINT_VER)
3131

hack/go-install.sh

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -21,22 +21,22 @@ set -o errexit
2121
set -o nounset
2222
set -o pipefail
2323

24-
if [ -z "${1}" ]; then
24+
if [[ -z "${1:-}" ]]; then
2525
echo "must provide module as first parameter"
2626
exit 1
2727
fi
2828

29-
if [ -z "${2}" ]; then
29+
if [[ -z "${2:-}" ]]; then
3030
echo "must provide binary name as second parameter"
3131
exit 1
3232
fi
3333

34-
if [ -z "${3}" ]; then
34+
if [[ -z "${3:-}" ]]; then
3535
echo "must provide version as third parameter"
3636
exit 1
3737
fi
3838

39-
if [ -z "${GOBIN}" ]; then
39+
if [[ -z "${GOBIN:-}" ]]; then
4040
echo "GOBIN is not set. Must set GOBIN to install the bin in a specified directory."
4141
exit 1
4242
fi
@@ -57,6 +57,6 @@ cd "${tmp_dir}"
5757
go mod init fake/mod
5858

5959
# install the golang module specified as the first argument
60-
go install -tags tools "${1}@${3}"
60+
go install -tags kcptools "${1}@${3}"
6161
mv "${GOBIN}/${2}" "${GOBIN}/${2}-${3}"
62-
ln -sf "${GOBIN}/${2}-${3}" "${GOBIN}/${2}"
62+
ln -sf "${GOBIN}/${2}-${3}" "${GOBIN}/${2}"

0 commit comments

Comments
 (0)