run: timeout: 2m linters: disable-all: true enable: - asciicheck - bodyclose - deadcode - dogsled - errcheck - funlen - goconst - gocritic - gocyclo - gofmt - gomnd - goprintffuncname - gosimple - govet - maligned - nakedret - nestif - nolintlint - prealloc - rowserrcheck - staticcheck - structcheck - typecheck - unconvert - unparam - unused - varcheck - gosec - misspell - whitespace - exhaustive #смотрит на соответствие между элементами enum и swich кейсами - exportloopref #for _,p := []int{1, 2, 3} { s.Bar(&p) /* If s stores the pointer, it will be bug.*/ } - sqlclosecheck # Checks that sql.Rows and sql.Stmt are closed. linters-settings: maligned: suggest-new: true funlen: lines: 80 statements: 40 prealloc: # Report preallocation suggestions only on simple loops that have no returns/breaks/continues/gotos in them. # True by default. simple: true range-loops: true # Report preallocation suggestions on range loops, true by default for-loops: true # Report preallocation suggestions on for loops, false by default gocritic: # Enable multiple checks by tags, run `GL_DEBUG=gocritic golangci-lint run` to see all tags and checks. # Empty list by default. See https://github.com/go-critic/go-critic#usage -> section "Tags". enabled-tags: - diagnostic - performance disabled-checks: - hugeParam - rangeValCopy exhaustive: default-signifies-exhaustive: true issues: exclude-rules: - path: _test\.go # to exclude all test files for linter errcheck linters: - errcheck - linters: - gosec text: "G101:"