Skip to content

Commit

Permalink
Add golangci.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
nakabonne committed Apr 29, 2020
1 parent 2bc7483 commit dfcfc9e
Showing 1 changed file with 81 additions and 0 deletions.
81 changes: 81 additions & 0 deletions .golangci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@

linters:
disable-all: true
enable:
- staticcheck
- gosimple
- ineffassign
- errcheck
- misspell
- unparam
- gofmt
- goimports
- deadcode
- unused
- nesitf
- govet
- golint
- prealloc
- depguard
- dogsled
- dupl
- goconst
- gocritic
- gocyclo
- gomnd
- goprintffuncname
- gosec
- nakedret
- rowserrcheck
- scopelint
- structcheck
- stylecheck
- typecheck
- unconvert
- varcheck

linters-settings:
dupl:
threshold: 100
funlen:
lines: 100
statements: 50
goconst:
min-len: 2
min-occurrences: 2
gocritic:
enabled-tags:
- diagnostic
- experimental
- opinionated
- performance
- style
disabled-checks:
- dupImport # https://github.com/go-critic/go-critic/issues/845
- ifElseChain
- octalLiteral
- whyNoLint
- wrapperFunc
goimports:
local-prefixes: github.com/nakabonne/golintui
golint:
min-confidence: 0.3
gomnd:
settings:
mnd:
# don't include the "operation" and "assign"
checks: argument,case,condition,return
govet:
check-shadowing: true
settings:
printf:
funcs:
- (github.com/golangci/golangci-lint/pkg/logutils.Log).Infof
- (github.com/golangci/golangci-lint/pkg/logutils.Log).Warnf
- (github.com/golangci/golangci-lint/pkg/logutils.Log).Errorf
- (github.com/golangci/golangci-lint/pkg/logutils.Log).Fatalf
maligned:
suggest-new: true
misspell:
locale: US

0 comments on commit dfcfc9e

Please sign in to comment.