Skip to content

Commit

Permalink
golangci: update configuration from org-wide linter
Browse files Browse the repository at this point in the history
We can't reuse the job at the moment because of the tree service code (#1007),
but let's at least grab the best settings we can have now (they don't change
often anyway).

Signed-off-by: Roman Khimov <[email protected]>
  • Loading branch information
roman-khimov committed Oct 1, 2024
1 parent 1f2abd9 commit e995083
Showing 1 changed file with 31 additions and 2 deletions.
33 changes: 31 additions & 2 deletions .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,18 @@ linters-settings:
# 'default' case is present, even if all enum members aren't listed in the
# switch
default-signifies-exhaustive: true
gofmt:
rewrite-rules:
- pattern: 'interface{}'
replacement: 'any'
gomodguard:
blocked:
modules:
- github.com/pkg/errors:
reason: "Obsolete after the 1.13 release; use the standard `errors` package"
revive:
rules:
- name: duplicated-imports

linters:
enable:
Expand All @@ -32,17 +44,34 @@ linters:
# some default golangci-lint linters
- errcheck
- gosimple
- godot
- ineffassign
- staticcheck
- typecheck
- unused

# extra linters
# - goconst
# - goerr113
# - gomnd
# - nonamedreturns
# - unparam
- bidichk
- bodyclose
- contextcheck
- copyloopvar
- decorder
- durationcheck
- errorlint
- exhaustive
- godot
- gofmt
- whitespace
- goimports
- gomodguard
- intrange
- misspell
- predeclared
- reassign
- whitespace
disable-all: true
fast: false

Expand Down

0 comments on commit e995083

Please sign in to comment.