github.com/yuqengo/golangci-lint@v0.0.2/.golangci.yml (about) 1 linters-settings: 2 depguard: 3 list-type: denylist 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 goconst: 16 min-len: 2 17 min-occurrences: 3 18 gocritic: 19 enabled-tags: 20 - diagnostic 21 - experimental 22 - opinionated 23 - performance 24 - style 25 disabled-checks: 26 - dupImport # https://github.com/go-critic/go-critic/issues/845 27 - ifElseChain 28 - octalLiteral 29 - whyNoLint 30 - wrapperFunc 31 gocyclo: 32 min-complexity: 15 33 goimports: 34 local-prefixes: github.com/golangci/golangci-lint 35 gomnd: 36 # don't include the "operation" and "assign" 37 checks: 38 - argument 39 - case 40 - condition 41 - return 42 ignored-numbers: 43 - '0' 44 - '1' 45 - '2' 46 - '3' 47 ignored-functions: 48 - strings.SplitN 49 50 govet: 51 check-shadowing: true 52 settings: 53 printf: 54 funcs: 55 - (github.com/golangci/golangci-lint/pkg/logutils.Log).Infof 56 - (github.com/golangci/golangci-lint/pkg/logutils.Log).Warnf 57 - (github.com/golangci/golangci-lint/pkg/logutils.Log).Errorf 58 - (github.com/golangci/golangci-lint/pkg/logutils.Log).Fatalf 59 lll: 60 line-length: 140 61 misspell: 62 locale: US 63 nolintlint: 64 allow-leading-space: false 65 allow-unused: false # report any unused nolint directives 66 require-explanation: false # don't require an explanation for nolint directives 67 require-specific: false # don't require nolint directives to be specific about which linter is being skipped 68 69 linters: 70 disable-all: true 71 enable: 72 - bodyclose 73 - deadcode 74 - depguard 75 - dogsled 76 - dupl 77 - errcheck 78 - exportloopref 79 - funlen 80 - gochecknoinits 81 - goconst 82 - gocritic 83 - gocyclo 84 - gofmt 85 - goimports 86 - gomnd 87 - goprintffuncname 88 - gosec 89 - gosimple 90 - govet 91 - ineffassign 92 - lll 93 - misspell 94 - nakedret 95 - noctx 96 - nolintlint 97 - staticcheck 98 - structcheck 99 - stylecheck 100 - typecheck 101 - unconvert 102 - unparam 103 - unused 104 - varcheck 105 - whitespace 106 107 # don't enable: 108 # - asciicheck 109 # - scopelint 110 # - gochecknoglobals 111 # - gocognit 112 # - godot 113 # - godox 114 # - goerr113 115 # - interfacer 116 # - maligned 117 # - nestif 118 # - prealloc 119 # - testpackage 120 # - revive 121 # - wsl 122 123 issues: 124 # Excluding configuration per-path, per-linter, per-text and per-source 125 exclude-rules: 126 - path: _test\.go 127 linters: 128 - gomnd 129 130 - path: pkg/golinters/errcheck.go 131 text: "SA1019: errCfg.Exclude is deprecated: use ExcludeFunctions instead" 132 - path: pkg/commands/run.go 133 text: "SA1019: lsc.Errcheck.Exclude is deprecated: use ExcludeFunctions instead" 134 - path: pkg/commands/run.go 135 text: "SA1019: e.cfg.Run.Deadline is deprecated: Deadline exists for historical compatibility and should not be used." 136 137 - path: pkg/golinters/gofumpt.go 138 text: "SA1019: settings.LangVersion is deprecated: use the global `run.go` instead." 139 - path: pkg/golinters/staticcheck_common.go 140 text: "SA1019: settings.GoVersion is deprecated: use the global `run.go` instead." 141 - path: pkg/lint/lintersdb/manager.go 142 text: "SA1019: (.+).(GoVersion|LangVersion) is deprecated: use the global `run.go` instead." 143 144 145 run: 146 timeout: 5m 147 go: '1.17' # TODO(ldez): we force to use an old version of Go for the CI and the tests. 148 skip-dirs: 149 - test/testdata_etc 150 - internal/cache 151 - internal/renameio 152 - internal/robustio