Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ test:
.PHONY: lint
lint:
go mod tidy
go tool github.com/golangci/golangci-lint/cmd/golangci-lint run -v --fix --config=./etc/.golangci.yaml --timeout 5m
go tool github.com/golangci/golangci-lint/v2/cmd/golangci-lint run -v --fix --config=./etc/.golangci.yaml --timeout 5m

.PHONY: docker-all
docker-all: docker-build-64 docker-build-32
Expand Down
164 changes: 79 additions & 85 deletions etc/.golangci.yaml
Original file line number Diff line number Diff line change
@@ -1,120 +1,114 @@
service:
golangci-lint-version: 1.51.x
version: "2"
run:
deadline: 900s
modules-download-mode: readonly
linters:
enable-all: true
default: all
disable:
- asasalint
- mnd
- containedctx
- contextcheck
- cyclop
- deadcode
- depguard
- exhaustivestruct
- err113
- exhaustruct
- forcetypeassert
- funlen
- gocognit
- godox
- goerr113
- gochecknoglobals
- gochecknoinits
- gocognit
- gocyclo
- gofmt
- goimports
- golint
- gomnd
- ifshort
- godox
- importas
- interfacebloat
- interfacer
- ireturn
- maintidx
- maligned
- makezero
- mnd
- musttag
- nakedret
- nestif
- nlreturn
- nosnakecase
- nonamedreturns
- nosprintfhostport
- paralleltest
- prealloc
- scopelint
- structcheck
- tagliatelle
- testpackage
- thelper # false positives
- varcheck
- thelper
- varnamelen
- wrapcheck
- wsl
linters-settings:
errcheck:
check-blank: true
gci:
sections:
- standard
- default
gofumpt:
lang-version: "1.23"
extra-rules: true
gosec:
excludes:
- G115
govet:
enable-all: true
disable:
- fieldalignment
- shadow
- composites
revive:
# Unfortunately configuring a single rules disables all other rules, even
# if we set `enable-all: true`
#
# To get around this, we include default rules:
# https://github.com/mgechev/revive/blob/master/defaults.toml
settings:
errcheck:
check-blank: true
gosec:
excludes:
- G115
govet:
disable:
- fieldalignment
- shadow
- composites
enable-all: true
lll:
line-length: 140
revive:
rules:
- name: blank-imports
- name: context-as-argument
arguments:
- allowTypesBefore: testing.TB,*testing.T,*testing.B,*testing.F
disabled: false
- name: context-keys-type
- name: dot-imports
- name: empty-block
- name: error-naming
- name: error-return
- name: error-strings
- name: errorf
- name: exported
- name: increment-decrement
- name: indent-error-flow
- name: package-comments
- name: range
- name: receiver-naming
- name: redefines-builtin-id
- name: superfluous-else
- name: time-naming
- name: unexported-return
- name: unreachable-code
- name: var-declaration
- name: var-naming
exclusions:
generated: lax
rules:
- name: blank-imports
- name: context-as-argument
disabled: false
arguments:
- allowTypesBefore: "testing.TB,*testing.T,*testing.B,*testing.F"
- name: context-keys-type
- name: dot-imports
- name: empty-block
- name: error-naming
- name: error-return
- name: error-strings
- name: errorf
- name: exported
- name: increment-decrement
- name: indent-error-flow
- name: package-comments
- name: range
- name: receiver-naming
- name: redefines-builtin-id
- name: superfluous-else
- name: time-naming
- name: unexported-return
- name: unreachable-code
- name: var-declaration
- name: var-naming
lll:
line-length: 140
- linters:
- dupword
- errcheck
- exhaustive
- goconst
- gosec
path: _test\.go$
paths:
- third_party$
- builtin$
- examples$
issues:
exclude-rules:
- path: _test\.go$
linters:
- dupword
- errcheck
- exhaustive
- goconst
- gosec
exclude-use-default: false
max-per-linter: 0
max-same-issues: 0
max-same-issues: 0
formatters:
enable:
- gci
- gofumpt
settings:
gci:
sections:
- standard
- default
gofumpt:
extra-rules: true
exclusions:
generated: lax
paths:
- third_party$
- builtin$
- examples$
Loading
Loading