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
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ jobs:
cache: true

- name: Lint
uses: golangci/golangci-lint-action@1e7e51e771db61008b38414a730f564565cf7c20 # v9.2.0
uses: golangci/golangci-lint-action@ba0d7d2ec06a0ea1cb5fa41b2e4a3ab91d21278a # v9.3.0
with:
version: v2.12.2

Expand Down
30 changes: 30 additions & 0 deletions .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,18 +9,26 @@ linters:
- copyloopvar
- depguard
- dogsled
- dupword
- durationcheck
- embeddedstructfieldcheck
- errcheck
- errchkjson
- errname
- errorlint
- exhaustive
- exptostd
- fatcontext
- forcetypeassert
- gocheckcompilerdirectives
- gochecknoinits
- gocritic
- godot
- gomoddirectives
- goprintffuncname
- gosec
- govet
- iface
- inamedparam
- ineffassign
- intrange
Expand All @@ -29,15 +37,21 @@ linters:
- mirror
- modernize
- nakedret
- nilerr
- nilnesserr
- nilnil
- nolintlint
- nosprintfhostport
- perfsprint
- predeclared
- reassign
- recvcheck
- revive
- staticcheck
- testableexamples
- testifylint
- thelper
- tparallel
- unconvert
- unparam
- unused
Expand All @@ -60,6 +74,16 @@ linters:
deny:
- pkg: github.com/stretchr/testify
desc: testify is for tests only
gosec:
excludes:
# Zero-copy []byte->string via unsafe is deliberate and
# documented (FindBytes/ContainsBytes).
- G103
# Flagged int conversions are bounds-checked by construction
# (trie indices, base32/bech32 5-bit groups).
- G115
# The scanner's job is opening user-supplied paths.
- G304
gocritic:
disabled-checks:
- dupImport
Expand All @@ -86,6 +110,12 @@ linters:
presets:
- comments
- std-error-handling
rules:
# Tests hardcode fake credentials on purpose and use relaxed
# file permissions / math/rand; gosec adds only noise there.
- path: _test\.go
linters:
- gosec
issues:
max-same-issues: 3
formatters:
Expand Down