Skip to content

Instantly share code, notes, and snippets.

@feketegy
Created March 2, 2025 17:37
Show Gist options
  • Save feketegy/7514bb5d86827133d06263275156024c to your computer and use it in GitHub Desktop.
Save feketegy/7514bb5d86827133d06263275156024c to your computer and use it in GitHub Desktop.
golangci-lint cofig
---
run:
timeout: 1m
issues-exit-code: 2
tests: false
output:
sort-results: true
issues:
max-same-issues: 0
exclude:
- "func \x60(.*)\x60 is unused"
linters:
disable-all: true
enable:
- asciicheck
- bodyclose
- cyclop
- dogsled
- dupl
- errcheck
- errname
- forcetypeassert
- gochecknoinits
- gocognit
- goimports
- gomoddirectives
- gosec
- gosimple
- govet
- ineffassign
- interfacebloat
- misspell
- musttag
- nestif
- noctx
- revive
- sloglint
- staticcheck
- stylecheck
- tagliatelle
- unconvert
- unused
linters-settings:
errcheck:
exclude-functions:
- (github.com/jackc/pgx/v5.Tx).Rollback
dupl:
threshold: 200
gosimple:
checks:
- all
- '-S1002' # ignore implicit if conditions
- '-S1034'
cyclop:
max-complexity: 14
skip-tests: true
tagliatelle:
case:
rules:
json: goCamel
interfacebloat:
max: 8
gosec:
excludes:
- G115
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment