Skip to content

Commit

Permalink
Merge pull request #43 from syself/cleanup-lint-go-makefile
Browse files Browse the repository at this point in the history
🌱 Removing deprecated linter; aligning to go1.17.6; cleanup makefile
  • Loading branch information
batistein authored Jan 11, 2022
2 parents 088eebb + 1bbfcda commit ea14dee
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 5 deletions.
1 change: 0 additions & 1 deletion .golangci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@ linters:
- unparam
- varcheck
- whitespace
- golint
- gci

linters-settings:
Expand Down
5 changes: 2 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ SHELL = /usr/bin/env bash -o pipefail
#
# Go.
#
GO_VERSION ?= 1.17.3
GO_VERSION ?= 1.17.6
GO_CONTAINER_IMAGE ?= docker.io/library/golang:$(GO_VERSION)

# Use GOPROXY environment variable if set
Expand Down Expand Up @@ -261,7 +261,6 @@ modules: ## Runs go mod to ensure modules are up to date.
.PHONY: lint
lint: golang-ci-lint $(GOLANGCI_LINT) ## Lint Golang codebase
$(GOLANGCI_LINT) run -v $(GOLANGCI_LINT_EXTRA_ARGS)
cd $(TOOLS_DIR); $(GOLANGCI_LINT) run -v $(GOLANGCI_LINT_EXTRA_ARGS)

.PHONY: lint-fix
lint-fix: golang-ci-lint $(GOLANGCI_LINT) ## Lint the Go codebase and run auto-fixers if supported by the linter.
Expand All @@ -274,7 +273,7 @@ format-tiltfile: ## Format the Tiltfile
ALL_VERIFY_CHECKS = boilerplate shellcheck tiltfile modules gen

.PHONY: verify
verify: $(addprefix verify-,$(ALL_VERIFY_CHECKS)) ## Run all verify-* targets
verify: $(addprefix verify-,$(ALL_VERIFY_CHECKS)) lint ## Run all verify-* targets
@echo "All verify checks passed, congrats!"


Expand Down
2 changes: 1 addition & 1 deletion hack/ensure-go.sh
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ EOF
local go_version
IFS=" " read -ra go_version <<< "$(go version)"
local minimum_go_version
minimum_go_version=go1.17.5
minimum_go_version=go1.17.6
if [[ "${minimum_go_version}" != $(echo -e "${minimum_go_version}\n${go_version[2]}" | sort -s -t. -k 1,1 -k 2,2n -k 3,3n | head -n1) && "${go_version[2]}" != "devel" ]]; then
cat <<EOF
Detected go version: ${go_version[*]}.
Expand Down

0 comments on commit ea14dee

Please sign in to comment.