From 1f279bea965486f9fea373d24c518a5be688658c Mon Sep 17 00:00:00 2001 From: Tom Bamford Date: Sat, 19 Nov 2022 01:26:18 +0000 Subject: [PATCH] Update golangci-lint --- .github/workflows/golint.yaml | 2 +- .golangci.yml | 3 --- GNUmakefile | 7 +++---- 3 files changed, 4 insertions(+), 8 deletions(-) diff --git a/.github/workflows/golint.yaml b/.github/workflows/golint.yaml index c0421306588f..588d16e3f3d4 100644 --- a/.github/workflows/golint.yaml +++ b/.github/workflows/golint.yaml @@ -26,5 +26,5 @@ jobs: go-version-file: .go-version - uses: golangci/golangci-lint-action@v3 with: - version: 'v1.45.0' + version: 'v1.50.1' args: -v diff --git a/.golangci.yml b/.golangci.yml index 96481cc43590..b8d6dda80d54 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -15,7 +15,6 @@ linters: disable-all: true enable: - asciicheck - - deadcode - errcheck - gocritic - gofmt @@ -26,12 +25,10 @@ linters: - nakedret - misspell - staticcheck - - structcheck - typecheck - unused - unconvert - unparam - - varcheck - vet - vetshadow # - whitespace # Disabled for performance reasons - Ignores cache and takes 12+ minutes to run on the repo for _any_ change diff --git a/GNUmakefile b/GNUmakefile index ab8412ca27b8..335acb5b8c35 100644 --- a/GNUmakefile +++ b/GNUmakefile @@ -1,6 +1,5 @@ TEST?=$$(go list ./... |grep -v 'vendor'|grep -v 'examples') WEBSITE_REPO=github.com/hashicorp/terraform-website -PKG_NAME=azurerm TESTTIMEOUT=180m .EXPORT_ALL_VARIABLES: @@ -17,7 +16,7 @@ tools: go install github.com/katbyte/terrafmt@latest go install golang.org/x/tools/cmd/goimports@latest go install mvdan.cc/gofumpt@latest - curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $$(go env GOPATH || $$GOPATH)/bin v1.45.0 + curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $$(go env GOPATH || $$GOPATH)/bin v1.50.1 build: fmtcheck generate go install @@ -88,7 +87,7 @@ test: fmtcheck test-compile: @if [ "$(TEST)" = "./..." ]; then \ echo "ERROR: Set TEST to a specific package. For example,"; \ - echo " make test-compile TEST=./$(PKG_NAME)"; \ + echo " make test-compile TEST=./internal"; \ exit 1; \ fi go test -c $(TEST) $(TESTARGS) @@ -126,7 +125,7 @@ ifeq (,$(wildcard $(GOPATH)/src/$(WEBSITE_REPO))) echo "$(WEBSITE_REPO) not found in your GOPATH (necessary for layouts and assets), get-ting..." git clone https://$(WEBSITE_REPO) $(GOPATH)/src/$(WEBSITE_REPO) endif - @$(MAKE) -C $(GOPATH)/src/$(WEBSITE_REPO) website-provider PROVIDER_PATH=$(shell pwd) PROVIDER_NAME=$(PKG_NAME) + @$(MAKE) -C $(GOPATH)/src/$(WEBSITE_REPO) website-provider PROVIDER_PATH=$(shell pwd) PROVIDER_NAME=azurerm scaffold-website: ./scripts/scaffold-website.sh