Skip to content

Commit

Permalink
Merge pull request #807 from dpippenger/fix_linter_in_master
Browse files Browse the repository at this point in the history
Update to golintci version that is compatible with go 1.21.x
  • Loading branch information
bai committed Mar 21, 2024
2 parents 4a05b20 + 9b09749 commit 2e716f8
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ jobs:
${{ runner.os }}-go-
- name: Install dependencies
run: curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(go env GOPATH)/bin v1.51.2
run: curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(go env GOPATH)/bin v1.54.0

- name: Run test suite
run: make test
Expand Down
30 changes: 29 additions & 1 deletion .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,13 +33,41 @@ linters-settings:
funlen:
lines: 350
statements: 200
revive:
# default rules derived from upstream revive repo
# https://github.com/walles/revive/blob/f417cbd57c6d90b43bdb7f113c222e5aeef117e5/defaults.toml
rules:
- name: blank-imports
- name: context-as-argument
- name: context-keys-type
- name: dot-imports
- name: error-return
- name: error-strings
- name: error-naming
- name: exported
# - name: if-return
- name: increment-decrement
- name: var-naming
- name: var-declaration
- name: package-comments
- name: range
- name: receiver-naming
- name: time-naming
- name: unexported-return
- name: indent-error-flow
- name: errorf
- name: empty-block
- name: superfluous-else
# - name: unused-parameter
- name: unreachable-code
- name: redefines-builtin-id

linters:
disable-all: true
enable:
- bodyclose
# - deadcode
- depguard
# - depguard
- dogsled
# - dupl
# - errcheck
Expand Down

0 comments on commit 2e716f8

Please sign in to comment.