|
| 1 | +--- |
| 2 | +version: 2 |
| 3 | +# Options for analysis running. |
| 4 | +run: |
| 5 | + # Number of operating system threads (`GOMAXPROCS`) that can execute golangci-lint simultaneously. |
| 6 | + # If it is explicitly set to 0 (i.e. not the default) then golangci-lint will automatically set the value to match Linux container CPU quota. |
| 7 | + # Default: the number of logical CPUs in the machine |
| 8 | + concurrency: 4 |
| 9 | + # Timeout for analysis, e.g. 30s, 5m. |
| 10 | + # Default: 1m |
| 11 | + timeout: 5m |
| 12 | + # Exit code when at least one issue was found. |
| 13 | + # Default: 1 |
| 14 | + issues-exit-code: 2 |
| 15 | + # Include test files or not. |
| 16 | + # Default: true |
| 17 | + tests: false |
| 18 | + # List of build tags, all linters use it. |
| 19 | + # Default: [] |
| 20 | + # build-tags: |
| 21 | + # - tag |
| 22 | + # If set, we pass it to "go list -mod={option}". From "go help modules": |
| 23 | + # If invoked with -mod=readonly, the go command is disallowed from the implicit |
| 24 | + # automatic updating of go.mod described above. Instead, it fails when any changes |
| 25 | + # to go.mod are needed. This setting is most useful to check that go.mod does |
| 26 | + # not need updates, such as in a continuous integration and testing system. |
| 27 | + # If invoked with -mod=vendor, the go command assumes that the vendor |
| 28 | + # directory holds the correct copies of dependencies and ignores |
| 29 | + # the dependency descriptions in go.mod. |
| 30 | + # |
| 31 | + # Allowed values: readonly|vendor|mod |
| 32 | + # Default: "" |
| 33 | + modules-download-mode: readonly |
| 34 | + # Allow multiple parallel golangci-lint instances running. |
| 35 | + # If false, golangci-lint acquires file lock on start. |
| 36 | + # Default: false |
| 37 | + allow-parallel-runners: true |
| 38 | + # Allow multiple golangci-lint instances running, but serialize them around a lock. |
| 39 | + # If false, golangci-lint exits with an error if it fails to acquire file lock on start. |
| 40 | + # Default: false |
| 41 | + allow-serial-runners: true |
| 42 | + # Define the Go version limit. |
| 43 | + # Mainly related to generics support since go1.18. |
| 44 | + # Default: use Go version from the go.mod file, fallback on the env var `GOVERSION`, fallback on 1.17 |
| 45 | + go: "1.25.0" |
| 46 | + |
| 47 | +exclusions: |
| 48 | + # Which file paths to exclude: they will be analyzed, but issues from them won't be reported. |
| 49 | + # "/" will be replaced by the current OS file path separator to properly work on Windows. |
| 50 | + # Default: [] |
| 51 | + paths: |
| 52 | + - "cmd/*/test-*" |
| 53 | + |
| 54 | +linters: |
| 55 | + # Enable specific linter |
| 56 | + # https://golangci-lint.run/usage/linters/#enabled-by-default |
| 57 | + default: all |
| 58 | + enable: |
| 59 | + - wsl_v5 |
| 60 | + disable: |
| 61 | + - exhaustruct |
| 62 | + - depguard |
| 63 | + - ireturn |
| 64 | + - lll |
| 65 | + - tagliatelle |
| 66 | + - wsl |
| 67 | + |
| 68 | + settings: |
| 69 | + cyclop: |
| 70 | + # The maximal code complexity to report. |
| 71 | + # Default: 10 |
| 72 | + max-complexity: 12 |
| 73 | + errcheck: |
| 74 | + # Report about not checking of errors in type assertions: `a := b.(MyStruct)`. |
| 75 | + # Such cases aren't reported by default. |
| 76 | + # Default: false |
| 77 | + check-type-assertions: true |
| 78 | + # report about assignment of errors to blank identifier: `num, _ := strconv.Atoi(numStr)`. |
| 79 | + # Such cases aren't reported by default. |
| 80 | + # Default: false |
| 81 | + check-blank: true |
| 82 | + # To disable the errcheck built-in exclude list. |
| 83 | + # See `-excludeonly` option in https://github.com/kisielk/errcheck#excluding-functions for details. |
| 84 | + # Default: false |
| 85 | + disable-default-exclusions: false |
| 86 | + # List of functions to exclude from checking, where each entry is a single function to exclude. |
| 87 | + # See https://github.com/kisielk/errcheck#excluding-functions for details. |
| 88 | + exclude-functions: |
| 89 | + - fmt.Fprintf |
| 90 | + - fmt.Fprintln |
| 91 | + funlen: |
| 92 | + lines: 100 |
| 93 | + lll: |
| 94 | + # Max line length, lines longer will be reported. |
| 95 | + # '\t' is counted as 1 character by default, and can be changed with the tab-width option. |
| 96 | + # Default: 120. |
| 97 | + line-length: 150 |
| 98 | + # Tab width in spaces. |
| 99 | + # Default: 1 |
| 100 | + tab-width: 1 |
| 101 | + |
| 102 | + ireturn: |
| 103 | + # ireturn does not allow using `allow` and `reject` settings at the same time. |
| 104 | + # Both settings are lists of the keywords and regular expressions matched to interface or package names. |
| 105 | + # keywords: |
| 106 | + # - `empty` for `any` |
| 107 | + # - `error` for errors |
| 108 | + # - `stdlib` for standard library |
| 109 | + # - `anon` for anonymous interfaces |
| 110 | + # - `generic` for generic interfaces added in go 1.18 |
| 111 | + |
| 112 | + # By default, it allows using errors, empty interfaces, anonymous interfaces, |
| 113 | + # and interfaces provided by the standard library. |
| 114 | + allow: |
| 115 | + - anon |
| 116 | + - error |
| 117 | + - empty |
| 118 | + - stdlib |
| 119 | + # You can specify idiomatic endings for interface |
| 120 | + - (or|er|ry)$ |
| 121 | + |
| 122 | + wrapcheck: |
| 123 | + # An array of strings that specify globs of packages to ignore. |
| 124 | + # Default: [] |
| 125 | + ignore-package-globs: |
| 126 | + - github.com/hyp3rd/* |
| 127 | + - github.com/gofiber/fiber/* |
| 128 | + |
| 129 | + varnamelen: |
| 130 | + # The longest distance, in source lines, that is being considered a "small scope". |
| 131 | + # Variables used in at most this many lines will be ignored. |
| 132 | + # Default: 5 |
| 133 | + max-distance: 6 |
| 134 | + # The minimum length of a variable's name that is considered "long". |
| 135 | + # Variable names that are at least this long will be ignored. |
| 136 | + # Default: 3 |
| 137 | + min-name-length: 2 |
| 138 | + # Check method receivers. |
| 139 | + # Default: false |
| 140 | + check-receiver: false |
| 141 | + # Check named return values. |
| 142 | + # Default: false |
| 143 | + check-return: true |
| 144 | + # Check type parameters. |
| 145 | + # Default: false |
| 146 | + check-type-param: true |
| 147 | + # Ignore "ok" variables that hold the bool return value of a type assertion. |
| 148 | + # Default: false |
| 149 | + ignore-type-assert-ok: true |
| 150 | + # Ignore "ok" variables that hold the bool return value of a map index. |
| 151 | + # Default: false |
| 152 | + ignore-map-index-ok: true |
| 153 | + # Ignore "ok" variables that hold the bool return value of a channel receive. |
| 154 | + # Default: false |
| 155 | + ignore-chan-recv-ok: true |
| 156 | + # Optional list of variable names that should be ignored completely. |
| 157 | + # Default: [] |
| 158 | + ignore-names: |
| 159 | + - err |
| 160 | + # Optional list of variable declarations that should be ignored completely. |
| 161 | + # Entries must be in one of the following forms (see below for examples): |
| 162 | + # - for variables, parameters, named return values, method receivers, or type parameters: |
| 163 | + # <name> <type> (<type> can also be a pointer/slice/map/chan/...) |
| 164 | + # - for constants: const <name> |
| 165 | + # |
| 166 | + # Default: [] |
| 167 | + ignore-decls: |
| 168 | + - c echo.Context |
| 169 | + - t testing.T |
| 170 | + - f *foo.Bar |
| 171 | + - e error |
| 172 | + - i int |
| 173 | + - const C |
| 174 | + - r *http.Request |
| 175 | + - w http.ResponseWriter |
| 176 | + - T any |
| 177 | + - m map[string]int |
| 178 | + |
| 179 | + # Enable only fast linters from enabled linters set (first run won't be fast) |
| 180 | + # Default: false |
| 181 | + fast: false |
| 182 | + |
| 183 | +formatters: |
| 184 | + enable: |
| 185 | + # - gci |
| 186 | + - gofumpt |
| 187 | + - goimports |
| 188 | + # - golines |
| 189 | + # gci: |
| 190 | + # # Section configuration to compare against. |
| 191 | + # # Section names are case-insensitive and may contain parameters in (). |
| 192 | + # # The default order of sections is `standard > default > custom > blank > dot > alias > localmodule`, |
| 193 | + # # If `custom-order` is `true`, it follows the order of `sections` option. |
| 194 | + # # Default: ["standard", "default"] |
| 195 | + # sections: |
| 196 | + # - standard # Standard section: captures all standard packages. |
| 197 | + # - default # Default section: contains all imports that could not be matched to another section type. |
| 198 | + # - prefix(github.com/hyp3rd/ewrap) # Custom section: groups all imports with the specified Prefix. |
| 199 | + # # Checks that no inline comments are present. |
| 200 | + # # Default: false |
| 201 | + # no-inline-comments: false |
| 202 | + # # Checks that no prefix comments (comment lines above an import) are present. |
| 203 | + # # Default: false |
| 204 | + # no-prefix-comments: false |
| 205 | + # # Enable custom order of sections. |
| 206 | + # # If `true`, make the section order the same as the order of `sections`. |
| 207 | + # # Default: false |
| 208 | + # custom-order: true |
| 209 | + # # Drops lexical ordering for custom sections. |
| 210 | + # # Default: false |
| 211 | + # no-lex-order: false |
| 212 | + |
| 213 | + goimports: |
| 214 | + # A comma-separated list of prefixes, which, if set, checks import paths |
| 215 | + # with the given prefixes are grouped after 3rd-party packages. |
| 216 | + # Default: "" |
| 217 | + local-prefixes: github.com/hyp3rd/ewrap |
| 218 | + |
| 219 | + gofmt: |
| 220 | + gofumpt: |
| 221 | + # Module path which contains the source code being formatted. |
| 222 | + # Default: "" |
| 223 | + module-path: github.com/hyp3rd/ewrap |
| 224 | + # Choose whether to use the extra rules. |
| 225 | + # Default: false |
| 226 | + extra-rules: true |
| 227 | + |
| 228 | +# output configuration options |
| 229 | +output: |
| 230 | + # Print lines of code with issue. |
| 231 | + # Default: true |
| 232 | + print-issued-lines: true |
| 233 | + # Print linter name in the end of issue text. |
| 234 | + # Default: true |
| 235 | + print-linter-name: true |
| 236 | + # Add a prefix to the output file references. |
| 237 | + # Default: "" |
| 238 | + path-prefix: "" |
| 239 | + # Sort results by the order defined in `sort-order`. |
| 240 | + # Default: false |
| 241 | + sort-results: true |
| 242 | + # Order to use when sorting results. |
| 243 | + # Require `sort-results` to `true`. |
| 244 | + # Possible values: `file`, `linter`, and `severity`. |
| 245 | + # |
| 246 | + # If the severity values are inside the following list, they are ordered in this order: |
| 247 | + # 1. error |
| 248 | + # 2. warning |
| 249 | + # 3. high |
| 250 | + # 4. medium |
| 251 | + # 5. low |
| 252 | + # Either they are sorted alphabetically. |
| 253 | + # |
| 254 | + # Default: ["file"] |
| 255 | + sort-order: |
| 256 | + - linter |
| 257 | + - severity |
| 258 | + - file # filepath, line, and column. |
| 259 | + # Show statistics per linter. |
| 260 | + # Default: false |
| 261 | + show-stats: true |
| 262 | + |
| 263 | +issues: |
| 264 | + # Make issues output unique by line. |
| 265 | + # Default: true |
| 266 | + uniq-by-line: false |
0 commit comments