Skip to content

Commit

Permalink
Update golangci-lint to v1.54.2
Browse files Browse the repository at this point in the history
Signed-off-by: Marvin Beckers <[email protected]>
  • Loading branch information
embik committed Jan 25, 2024
1 parent b489010 commit aede36a
Show file tree
Hide file tree
Showing 3 changed files with 45 additions and 7 deletions.
38 changes: 38 additions & 0 deletions .golangci.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
run:
timeout: 10m
allow-parallel-runners: true

linters:
disable-all: true
enable:
- asasalint
- asciicheck
- bidichk
- bodyclose
- containedctx
- dupword
- durationcheck
- errcheck
- errchkjson
- exportloopref
- gocritic
- godot
- gofmt
- goprintffuncname
- gosec
- gosimple
- govet
- importas
- ineffassign
- misspell
- nilerr
- noctx
- nolintlint
- nosprintfhostport
- prealloc
- revive
- staticcheck
- unconvert
- unused
- usestdlibvars
- whitespace
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ CONTROLLER_GEN_BIN := controller-gen
CONTROLLER_GEN := $(GOBIN_DIR)/$(CONTROLLER_GEN_BIN)-$(CONTROLLER_GEN_VER)
export CONTROLLER_GEN

GOLANGCI_LINT_VER := v1.49.0
GOLANGCI_LINT_VER := v1.54.2
GOLANGCI_LINT_BIN := golangci-lint
GOLANGCI_LINT := $(GOBIN_DIR)/$(GOLANGCI_LINT_BIN)-$(GOLANGCI_LINT_VER)

Expand Down
12 changes: 6 additions & 6 deletions hack/go-install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -21,22 +21,22 @@ set -o errexit
set -o nounset
set -o pipefail

if [ -z "${1}" ]; then
if [[ -z "${1:-}" ]]; then
echo "must provide module as first parameter"
exit 1
fi

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

if [ -z "${3}" ]; then
if [[ -z "${3:-}" ]]; then
echo "must provide version as third parameter"
exit 1
fi

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

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

0 comments on commit aede36a

Please sign in to comment.