github.com/elek/golangci-lint@v1.42.2-0.20211208090441-c05b7fcb3a9a/.golangci.yml (about) 1 linters-settings: 2 depguard: 3 list-type: blacklist 4 packages: 5 # logging is allowed only by logutils.Log, logrus 6 # is allowed to use only in logutils package 7 - github.com/sirupsen/logrus 8 packages-with-error-message: 9 - github.com/sirupsen/logrus: "logging is allowed only by logutils.Log" 10 dupl: 11 threshold: 100 12 funlen: 13 lines: 100 14 statements: 50 15 gci: 16 local-prefixes: github.com/golangci/golangci-lint 17 goconst: 18 min-len: 2 19 min-occurrences: 2 20 gocritic: 21 enabled-tags: 22 - diagnostic 23 - experimental 24 - opinionated 25 - performance 26 - style 27 disabled-checks: 28 - dupImport # https://github.com/go-critic/go-critic/issues/845 29 - ifElseChain 30 - octalLiteral 31 - whyNoLint 32 - wrapperFunc 33 gocyclo: 34 min-complexity: 15 35 goimports: 36 local-prefixes: github.com/golangci/golangci-lint 37 gomnd: 38 settings: 39 mnd: 40 # don't include the "operation" and "assign" 41 checks: argument,case,condition,return 42 govet: 43 check-shadowing: true 44 settings: 45 printf: 46 funcs: 47 - (github.com/golangci/golangci-lint/pkg/logutils.Log).Infof 48 - (github.com/golangci/golangci-lint/pkg/logutils.Log).Warnf 49 - (github.com/golangci/golangci-lint/pkg/logutils.Log).Errorf 50 - (github.com/golangci/golangci-lint/pkg/logutils.Log).Fatalf 51 lll: 52 line-length: 140 53 maligned: 54 suggest-new: true 55 misspell: 56 locale: US 57 nolintlint: 58 allow-leading-space: true # don't require machine-readable nolint directives (i.e. with no leading space) 59 allow-unused: false # report any unused nolint directives 60 require-explanation: false # don't require an explanation for nolint directives 61 require-specific: false # don't require nolint directives to be specific about which linter is being skipped 62 63 linters: 64 disable-all: true 65 enable: 66 - bodyclose 67 - deadcode 68 - depguard 69 - dogsled 70 - dupl 71 - errcheck 72 - exportloopref 73 - exhaustive 74 - funlen 75 - gochecknoinits 76 - goconst 77 - gocritic 78 - gocyclo 79 - gofmt 80 - goimports 81 - gomnd 82 - goprintffuncname 83 - gosec 84 - gosimple 85 - govet 86 - ineffassign 87 - lll 88 - misspell 89 - nakedret 90 - noctx 91 - nolintlint 92 - rowserrcheck 93 - staticcheck 94 - structcheck 95 - stylecheck 96 - typecheck 97 - unconvert 98 - unparam 99 - unused 100 - varcheck 101 - whitespace 102 103 # don't enable: 104 # - asciicheck 105 # - scopelint 106 # - gochecknoglobals 107 # - gocognit 108 # - godot 109 # - godox 110 # - goerr113 111 # - interfacer 112 # - maligned 113 # - nestif 114 # - prealloc 115 # - testpackage 116 # - revive 117 # - wsl 118 119 issues: 120 # Excluding configuration per-path, per-linter, per-text and per-source 121 exclude-rules: 122 - path: _test\.go 123 linters: 124 - gomnd 125 126 - path: pkg/golinters/errcheck.go 127 text: "SA1019: errCfg.Exclude is deprecated: use ExcludeFunctions instead" 128 - path: pkg/commands/run.go 129 text: "SA1019: lsc.Errcheck.Exclude is deprecated: use ExcludeFunctions instead" 130 131 # TODO must be removed after the release of the next version (v1.41.0) 132 - path: pkg/commands/run.go 133 linters: 134 - gomnd 135 # TODO must be removed after the release of the next version (v1.41.0) 136 - path: pkg/golinters/nolintlint/nolintlint.go 137 linters: 138 - gomnd 139 # TODO must be removed after the release of the next version (v1.41.0) 140 - path: pkg/printers/tab.go 141 linters: 142 - gomnd 143 144 145 run: 146 skip-dirs: 147 - test/testdata_etc 148 - internal/cache 149 - internal/renameio 150 - internal/robustio