tokenbridge-monitor/.golangci.yml

63 lines
1.3 KiB
YAML

run:
concurrency: 4
timeout: 5m
go: '1.19'
linters:
enable-all: true
disable:
- dupl
- wrapcheck
- tagliatelle
- gomnd
- nlreturn
- gochecknoglobals
- lll
- ireturn
- exhaustivestruct
- exhaustruct
- contextcheck
linters-settings:
gci:
sections:
- standard
- default
- prefix(github.com/omni/tokenbridge-monitor)
funlen:
lines: 60
statements: 40
varnamelen:
ignore-names:
- db
- tx
- q
ignore-decls:
- w http.ResponseWriter
- r *http.Request
- r chi.Router
- bt *entity.BlockTimestamp
- ok bool
- wg *sync.WaitGroup
- i int
wsl:
allow-cuddle-declarations: true
gosec:
excludes:
- G114
issues:
exclude:
- .* should only be cuddled with .*
- only one cuddle assignment allowed before .* statement
- .* should not be cuddled .*
- go statements can only invoke functions assigned on line above
- only cuddled expressions if assigning variable or using from line above
- append only allowed to cuddle with appended value
- for statement without condition should never be cuddled
exclude-rules:
- path: cmd
linters:
- cyclop
- funlen
- path: '(.+)_test\.go'
linters:
- funlen