Skip to content
Merged
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
4 changes: 2 additions & 2 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,6 @@ jobs:
go-version-file: './go.mod'

- name: Run lint
uses: golangci/golangci-lint-action@v6
uses: golangci/golangci-lint-action@v7
with:
version: v1.64.5
version: v2.0.2
96 changes: 55 additions & 41 deletions .golangci.yml
Original file line number Diff line number Diff line change
@@ -1,54 +1,68 @@
version: "2"
run:
# The default concurrency value is the number of available CPU.
concurrency: 4
# Timeout for analysis, e.g. 30s, 5m.
# Default: 1m
timeout: 5m
# Which dirs to skip: issues from them won't be reported.
# Can use regexp here: `generated.*`, regexp is applied on full path,
# including the path prefix if one is set.
# Default value is empty list,
# but default dirs are skipped independently of this option's value (see skip-dirs-use-default).
# "/" will be replaced by current OS file path separator to properly work on Windows.
# skip-dirs:
# Which files to skip: they will be analyzed, but issues from them won't be reported.
# Default value is empty list,
# but there is no need to include all autogenerated files,
# we confidently recognize autogenerated files.
# If it's not please let us know.
# "/" will be replaced by current OS file path separator to properly work on Windows.
# skip-files:

output:
formats:
- format: colored-line-number
text:
path: stdout

# linters-settings:

linters:
# Disable all linters.
# Default: false
disable-all: false
# Enable specific linter
# https://golangci-lint.run/usage/linters/#enabled-by-default
# enable:
# Enable all available linters.
# Default: false
enable-all: false
# Disable specific linter
# https://golangci-lint.run/usage/linters/#disabled-by-default
enable:
- asasalint
- asciicheck
- bidichk
- bodyclose
- contextcheck
- durationcheck
- err113
- errchkjson
- errorlint
- exhaustive
- fatcontext
- gocheckcompilerdirectives
- gochecksumtype
- gocritic
- gosec
- gosmopolitan
- loggercheck
- makezero
- musttag
- nilerr
- nilnesserr
- noctx
- perfsprint
- prealloc
- protogetter
- reassign
- recvcheck
- revive
- rowserrcheck
- spancheck
- sqlclosecheck
- testifylint
- unparam
- zerologlint
disable:
- wrapcheck
# Enable presets.
# https://golangci-lint.run/usage/linters
presets:
- bugs
- error
- metalinter
- performance
- unused

# issues:

# severity:
exclusions:
generated: lax
presets:
- comments
- common-false-positives
- legacy
- std-error-handling
paths:
- third_party$
- builtin$
- examples$
formatters:
exclusions:
generated: lax
paths:
- third_party$
- builtin$
- examples$