Skip to content

Commit

Permalink
sdk-go/ci: upgrade golangci-lint (#112)
Browse files Browse the repository at this point in the history
  • Loading branch information
calebdoxsey authored Dec 14, 2023
1 parent d78463c commit 10854d1
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 35 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/lint.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@ jobs:

- uses: actions/setup-go@93397bea11091df50f3d7e59dc26a7711a8bcfbe
with:
go-version: 1.20.x
cache: true
go-version: 1.21.x
cache: false

- uses: golangci/golangci-lint-action@3a919529898de77ec3da873e3063ca4b10e7f5cc
with:
version: v1.51
version: v1.55
3 changes: 1 addition & 2 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,7 @@ jobs:

- uses: actions/setup-go@93397bea11091df50f3d7e59dc26a7711a8bcfbe
with:
go-version: 1.20.x
cache: true
go-version: 1.21.x

- name: test
run: make cover
Expand Down
24 changes: 0 additions & 24 deletions .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,6 @@ linters:
disable-all: true
enable:
- bodyclose
- depguard
- dogsled
- errcheck
- gofmt
Expand All @@ -70,29 +69,6 @@ linters:
- unconvert
- unparam
- unused
# - asciicheck
# - dupl
# - exhaustive
# - funlen
# - gochecknoglobals
# - gochecknoinits
# - gocognit
# - goconst
# - gocritic
# - gocyclo
# - godot
# - godox
# - goerr113
# - gomnd
# - interfacer
# - maligned
# - nestif
# - noctx
# - prealloc
# - scopelint
# - testpackage
# - whitespace
# - wsl

issues:
# List of regexps of issue texts to exclude, empty list by default.
Expand Down
2 changes: 1 addition & 1 deletion .tool-versions
Original file line number Diff line number Diff line change
@@ -1 +1 @@
golang 1.20.3
golang 1.21.3
6 changes: 1 addition & 5 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -18,17 +18,13 @@ clean: ## Cleanup any build binaries or packages.
$(RM) -r $(BINDIR)
$(RM) coverage.txt

.PHONY: build-deps
build-deps: ## Install build dependencies
@echo "==> $@"

.PHONY: build
build: ## Builds dynamic executables and/or packages.
@echo "==> $@"
@go build -o $(BINDIR)/$(NAME)

.PHONY: lint
lint: build-deps ## Verifies `golint` passes.
lint:
@echo "==> $@"
@VERSION=$$(go run github.com/mikefarah/yq/[email protected] '.jobs.lint.steps[] | select(.uses == "golangci/golangci-lint-action*") | .with.version' .github/workflows/lint.yaml) && \
go run github.com/golangci/golangci-lint/cmd/golangci-lint@$$VERSION run ./...
Expand Down

0 comments on commit 10854d1

Please sign in to comment.