Skip to content

Commit

Permalink
Bump golangci-lint to, use the new version subcommand. (#1687)
Browse files Browse the repository at this point in the history
Signed-off-by: Marcin Owsiany <mowsiany@D2iQ.com>
  • Loading branch information
porridge authored Sep 18, 2020
1 parent 5f4a85f commit b4b17b7
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ BUILD_DATE_PATH := github.com/kudobuilder/kudo/pkg/version.buildDate
DATE_FMT := "%Y-%m-%dT%H:%M:%SZ"
BUILD_DATE := $(shell date -u -d "@$SOURCE_DATE_EPOCH" "+${DATE_FMT}" 2>/dev/null || date -u -r "${SOURCE_DATE_EPOCH}" "+${DATE_FMT}" 2>/dev/null || date -u "+${DATE_FMT}")
LDFLAGS := -X ${GIT_VERSION_PATH}=${GIT_VERSION:v%=%} -X ${GIT_COMMIT_PATH}=${GIT_COMMIT} -X ${BUILD_DATE_PATH}=${BUILD_DATE}
GOLANGCI_LINT_VER = "1.29.0"
GOLANGCI_LINT_VER = "1.31.0"
SUPPORTED_PLATFORMS = amd64 arm64

export GO111MODULE=on
Expand Down Expand Up @@ -82,7 +82,7 @@ all: test manager ## Build manager and runs unit tests

.PHONY: lint
lint: ## Run golangci-lint
ifneq (${GOLANGCI_LINT_VER}, "$(shell golangci-lint --version 2>/dev/null | cut -b 27-32)")
ifneq (${GOLANGCI_LINT_VER}, "$(shell golangci-lint version --format short 2>&1)")
./hack/install-golangcilint.sh
endif
golangci-lint --timeout 3m run --allow-parallel-runners
Expand Down Expand Up @@ -187,7 +187,7 @@ generate-clean:
.PHONY: imports
# used to update imports on project. NOT a linter.
imports:
ifneq (${GOLANGCI_LINT_VER}, "$(shell golangci-lint --version 2>/dev/null | cut -b 27-32)")
ifneq (${GOLANGCI_LINT_VER}, "$(shell golangci-lint version --format short 2>&1)")
./hack/install-golangcilint.sh
endif
golangci-lint run --disable-all -E goimports --fix
Expand Down
2 changes: 1 addition & 1 deletion hack/install-golangcilint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@ set -o errexit
set -o nounset
set -o pipefail

GOLANGCILINT_VERSION=${GOLANGCILINT_VERSION:-v1.29.0}
GOLANGCILINT_VERSION=${GOLANGCILINT_VERSION:-v1.31.0}

curl -sSfL "https://raw.githubusercontent.com/golangci/golangci-lint/${GOLANGCILINT_VERSION}/install.sh" | sh -s -- -b "$(go env GOPATH)/bin" "${GOLANGCILINT_VERSION}"

0 comments on commit b4b17b7

Please sign in to comment.