github.com/wolfi-dev/wolfictl@v0.16.11/.golangci.yaml (about) 1 --- 2 run: 3 concurrency: 6 4 deadline: 5m 5 issues: 6 exclude-rules: 7 # counterfeiter fakes are usually named 'fake_<something>.go' 8 - path: fake_.*\.go 9 linters: 10 - gocritic 11 - golint 12 - dupl 13 14 # Maximum issues count per one linter. Set to 0 to disable. Default is 50. 15 max-issues-per-linter: 0 16 17 # Maximum count of issues with the same text. Set to 0 to disable. Default is 3. 18 max-same-issues: 0 19 linters: 20 disable-all: true 21 enable: 22 - asciicheck 23 - bodyclose 24 # - depguard is disabled because I didn't see us using it (e.g. defining our allowed deps), but it's causing lint errors locally. If we want to use it, we should define our allowed deps. 25 - dogsled 26 - dupl 27 - durationcheck 28 - errcheck 29 - gocritic 30 - gocyclo 31 - godox 32 - gofmt 33 - goheader 34 - goimports 35 # - gomoddirectives is disabled because it wasn't allowing the 'replace' directive, and it didn't look possible to exempt a single line of a go.mod. I'm not a fan of replaces, but they're useful as temporary measures. 36 - gomodguard 37 - goprintffuncname 38 - gosec 39 - gosimple 40 - govet 41 - importas 42 - ineffassign 43 - makezero 44 # - misspell 45 - nakedret 46 - nolintlint 47 # - prealloc is disabled because it is terrible. Following this rule doesn't necessarily improve the readability or performance of the code, and it can encourage wasteful allocations depending on the circumstance. 48 - predeclared 49 - promlinter 50 - revive 51 # - rowserrcheck is disabled because of generics. You can track the evolution of the generics support by following the https://github.com/golangci/golangci-lint/issues/2649 52 # - sqlclosecheck is disabled because of generics. You can track the evolution of the generics support by following the https://github.com/golangci/golangci-lint/issues/2649 53 - staticcheck 54 - stylecheck 55 - typecheck 56 - unconvert 57 - unparam 58 - unused 59 - whitespace 60 # - cyclop 61 # - errorlint 62 # - exhaustive 63 # - exhaustivestruct 64 # - exportloopref 65 # - forbidigo 66 # - forcetypeassert 67 # - funlen 68 # - gci 69 # - gochecknoglobals 70 # - gochecknoinits 71 # - gocognit 72 # - godot 73 # - goerr113 74 # - gomnd 75 # - ifshort 76 # - lll 77 # - nestif 78 # - nilerr 79 # - nlreturn 80 # - noctx 81 # - paralleltest 82 # - scopelint 83 # - tagliatelle 84 # - testpackage 85 # - thelper 86 # - tparallel 87 # - wastedassign 88 # - wrapcheck 89 # - wsl 90 linters-settings: 91 godox: 92 keywords: 93 - BUG 94 - FIXME 95 - HACK 96 errcheck: 97 check-type-assertions: true 98 check-blank: true 99 gocritic: 100 enabled-checks: 101 # Diagnostic 102 - appendAssign 103 - argOrder 104 - badCond 105 - caseOrder 106 - codegenComment 107 - commentedOutCode 108 - deprecatedComment 109 - dupArg 110 - dupBranchBody 111 - dupCase 112 - dupSubExpr 113 - exitAfterDefer 114 - flagDeref 115 - flagName 116 - nilValReturn 117 - offBy1 118 - sloppyReassign 119 - weakCond 120 - octalLiteral 121 122 # Performance 123 - appendCombine 124 - equalFold 125 # - hugeParam is disabled because it's not always worthwhile to favor a pointer over a value for "large" data types. Pointers can create footguns and create the need for additional nil checks to keep the code safe.. 126 - indexAlloc 127 - rangeExprCopy 128 - rangeValCopy 129 130 # Style 131 - assignOp 132 - boolExprSimplify 133 - captLocal 134 - commentFormatting 135 - commentedOutImport 136 - defaultCaseOrder 137 - docStub 138 - elseif 139 - emptyFallthrough 140 - emptyStringTest 141 - hexLiteral 142 - methodExprCall 143 - regexpMust 144 - singleCaseSwitch 145 - sloppyLen 146 - stringXbytes 147 - switchTrue 148 - typeAssertChain 149 - typeSwitchVar 150 - underef 151 - unlabelStmt 152 - unlambda 153 - unslice 154 - valSwap 155 - wrapperFunc 156 - yodaStyleExpr 157 # - ifElseChain 158 159 # Opinionated 160 - builtinShadow 161 - importShadow 162 - initClause 163 - nestingReduce 164 - paramTypeCombine 165 - ptrToRefParam 166 - typeUnparen 167 - unnamedResult 168 - unnecessaryBlock 169 nolintlint: 170 # Enable to ensure that nolint directives are all used. Default is true. 171 allow-unused: false 172 # Disable to ensure that nolint directives don't have a leading space. Default is true. 173 # TODO(lint): Enforce machine-readable `nolint` directives 174 allow-leading-space: true 175 # Exclude following linters from requiring an explanation. Default is []. 176 allow-no-explanation: [] 177 # Enable to require an explanation of nonzero length after each nolint directive. Default is false. 178 # TODO(lint): Enforce explanations for `nolint` directives 179 require-explanation: false 180 # Enable to require nolint directives to mention the specific linter being suppressed. Default is false. 181 require-specific: true 182 gomoddirectives: 183 replace-allow-list: 184 - gitlab.alpinelinux.org/alpine/go 185 - github.com/goccy/go-graphviz 186 - k8s.io/client-go 187 - github.com/anchore/syft