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
6 changes: 3 additions & 3 deletions .github/workflows/checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,13 +37,13 @@ jobs:
uses: actions/checkout@v2

- name: Install gofumpt
run: go install mvdan.cc/gofumpt@v0.4.0
run: go install mvdan.cc/gofumpt@v0.6.0

- name: Install staticcheck
run: go install honnef.co/go/tools/cmd/staticcheck@2024.1.1
run: go install honnef.co/go/tools/cmd/staticcheck@2025.1.1

- name: Install golangci-lint
run: go install github.com/golangci/golangci-lint/cmd/golangci-lint@v1.61.0
run: go install github.com/golangci/golangci-lint/v2/cmd/golangci-lint@v2.1.2

- name: Lint
run: make lint
Expand Down
86 changes: 86 additions & 0 deletions .golangci.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,86 @@
version: "2"
linters:
enable-all: true
disable:
- cyclop
- forbidigo
- funlen
- gochecknoglobals
- gochecknoinits
- gocritic
- godot
- godox
- mnd
- lll
- nestif
- nilnil
- nlreturn
- noctx
- nonamedreturns
- paralleltest
- revive
- testpackage
- unparam
- varnamelen
- wrapcheck
- wsl
- exhaustruct
- depguard
- err113

#
# Disabled because of generics:
#
- contextcheck
- rowserrcheck
- sqlclosecheck
- wastedassign

#
# Disabled because deprecated:
#

linters-settings:
#
# The G108 rule throws a false positive. We're not actually vulnerable. If
# you're not careful the profiling endpoint is automatically exposed on
# /debug/pprof if you import net/http/pprof. See this link:
#
# https://mmcloughlin.com/posts/your-pprof-is-showing
#
gosec:
excludes:
- G108

tagliatelle:
case:
rules:
json: snake

gofumpt:
extra-rules: true

exhaustruct:
exclude:
#
# Structures outside our control that have a ton of settings. It doesn't
# make sense to specify all of the fields.
#
- 'cobra.Command'
- 'logrus.*Formatter'

formatters:
enable:
- gci
- gofmt
- gofumpt
- goimports
settings:
gofumpt:
extra-rules: true
exclusions:
generated: lax
paths:
- third_party$
- builtin$
- examples$