Files
gocryptotrader/.golangci.yml
Adrian Gallagher f0d45aa1d2 golangci-lint/CI: Bump versions and introduce new linters (#798)
* golangci-lint/CI: Bump versions

Fix remaining linter issues

* Specifically set AppVeyor version

* Fix the infamous typos 👀

* Add go env cmd to AppVeyor

* Add go version cmd to AppVeyor

* Specify AppVeyor image, adjust linters

* Update go get to go install due to deprecation

* Bump golangci-lint timeout time for AppVeyor

* Change NW contract to NQ

* Address nitters

* GetRandomPair -> Pair{}

* Address nits

* Address time nitterinos plus additional tweaks

* More time inception upgrades!

* Bending time and space
2021-10-14 16:38:53 +11:00

133 lines
2.5 KiB
YAML

run:
timeout: 3m
issues-exit-code: 1
tests: true
skip-dirs:
- vendor
- web/
- testdata
linters:
disable-all: true
enable:
# defaults
# - deadcode
- errcheck
- gosimple
- govet
- ineffassign
- staticcheck
- structcheck
- typecheck
# - unused
# - varcheck
# disabled by default linters
- asciicheck
- bodyclose
# - cyclop
- depguard
- dogsled
# - dupl
- durationcheck
- errname
# - errorlint
# - exhaustive
# - exhaustivestruct
- exportloopref
# - forbidigo
- forcetypeassert
# - funlen
- gci
# - gochecknoglobals
# - gochecknoinits
# - gocognit
- goconst
- gocritic
# - gocyclo
# - godot
# - godox
# - goerr113
- gofmt
# - gofumpt
# - goheader
- goimports
# - golint // deprecated since 1.41.0, replaced by revive
# - gomnd
- gomoddirectives
- gomodguard
- goprintffuncname
- gosec
- ifshort
# - importas
# - interfacer // deprecated by its owner
# - lll
- makezero
# - maligned
- misspell
- nakedret
# - nestif
- nilerr
# - nlreturn
- noctx
- nolintlint
# - paralleltest
# - prealloc
- predeclared
# - promlinter
- revive
- rowserrcheck
# - scopelint // deprecated since v1.39.0, replaced by exportloopref
# - sqlclosecheck
- stylecheck
# - tagliatelle
# - testpackage
- thelper
- tparallel
- unconvert
- unparam
- wastedassign
- whitespace
# - wrapcheck
# - wsl
linters-settings:
govet:
check-shadowing: true
golint:
min-confidence: 0
goconst:
min-occurrences: 6
depguard:
list-type: blacklist
# lll:
# line-length: 80 # NOTE: we'll enforce this at a later point
gocritic:
enabled-tags:
- performance
- style
- experimental
disabled-checks:
- wrapperFunc
- importShadow
- methodExprCall
- evalOrder
issues:
max-issues-per-linter: 0
max-same-issues: 0
exclude-rules:
- text: "Expect WriteFile permissions to be 0600 or less"
linters:
- gosec
# List of regexps of issue texts to exclude, empty list by default.
# But independently from this option we use default exclude patterns,
# it can be disabled by `exclude-use-default: false`. To list all
# excluded by default patterns execute `golangci-lint run --help`
exclude:
# The following silences false positives in table tests
# https://github.com/kyoh86/scopelint/issues/4
- Using the variable on range scope `ti` in function literal