From 3d66aacc7fca94cd3ba41627c504c8520f4d1761 Mon Sep 17 00:00:00 2001 From: Fernandez Ludovic Date: Fri, 27 Sep 2024 23:18:55 +0200 Subject: [PATCH] chore: re-organize configuration references --- .golangci.next.reference.yml | 1022 +++++++++++++++++----------------- .golangci.reference.yml | 1021 ++++++++++++++++----------------- 2 files changed, 1022 insertions(+), 1021 deletions(-) diff --git a/.golangci.next.reference.yml b/.golangci.next.reference.yml index 827e1c3aec1a..266ecbf5a9a4 100644 --- a/.golangci.next.reference.yml +++ b/.golangci.next.reference.yml @@ -4,150 +4,284 @@ # This file is not a configuration example, # it contains the exhaustive configuration with explanations of the options. -# Options for analysis running. -run: - # Number of operating system threads (`GOMAXPROCS`) that can execute golangci-lint simultaneously. - # 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. - # Default: the number of logical CPUs in the machine - concurrency: 4 - - # Timeout for analysis, e.g. 30s, 5m. - # Default: 1m - timeout: 5m - - # Exit code when at least one issue was found. - # Default: 1 - issues-exit-code: 2 - - # Include test files or not. - # Default: true - tests: false - - # List of build tags, all linters use it. - # Default: [] - build-tags: - - mytag - - # If set, we pass it to "go list -mod={option}". From "go help modules": - # If invoked with -mod=readonly, the go command is disallowed from the implicit - # automatic updating of go.mod described above. Instead, it fails when any changes - # to go.mod are needed. This setting is most useful to check that go.mod does - # not need updates, such as in a continuous integration and testing system. - # If invoked with -mod=vendor, the go command assumes that the vendor - # directory holds the correct copies of dependencies and ignores - # the dependency descriptions in go.mod. - # - # Allowed values: readonly|vendor|mod - # Default: "" - modules-download-mode: readonly - - # Allow multiple parallel golangci-lint instances running. - # If false, golangci-lint acquires file lock on start. - # Default: false - allow-parallel-runners: true - - # Allow multiple golangci-lint instances running, but serialize them around a lock. - # If false, golangci-lint exits with an error if it fails to acquire file lock on start. - # Default: false - allow-serial-runners: true - - # Define the Go version limit. - # Mainly related to generics support since go1.18. - # Default: use Go version from the go.mod file, fallback on the env var `GOVERSION`, fallback on 1.17 - go: '1.19' - - -# output configuration options -output: - # The formats used to render issues. - # Formats: - # - `colored-line-number` - # - `line-number` - # - `json` - # - `colored-tab` - # - `tab` - # - `html` - # - `checkstyle` - # - `code-climate` - # - `junit-xml` - # - `junit-xml-extended` - # - `github-actions` - # - `teamcity` - # - `sarif` - # Output path can be either `stdout`, `stderr` or path to the file to write to. - # - # For the CLI flag (`--out-format`), multiple formats can be specified by separating them by comma. - # The output can be specified for each of them by separating format name and path by colon symbol. - # Example: "--out-format=checkstyle:report.xml,json:stdout,colored-line-number" - # The CLI flag (`--out-format`) override the configuration file. - # - # Default: - # formats: - # - format: colored-line-number - # path: stdout - formats: - - format: json - path: stderr - - format: checkstyle - path: report.xml - - format: colored-line-number - - # Print lines of code with issue. - # Default: true - print-issued-lines: false - - # Print linter name in the end of issue text. - # Default: true - print-linter-name: false - - # Make issues output unique by line. - # Default: true - uniq-by-line: false - - # Add a prefix to the output file references. - # Default: "" - path-prefix: "" - - # Sort results by the order defined in `sort-order`. +linters: + # Disable all linters. # Default: false - sort-results: true - - # Order to use when sorting results. - # Require `sort-results` to `true`. - # Possible values: `file`, `linter`, and `severity`. - # - # If the severity values are inside the following list, they are ordered in this order: - # 1. error - # 2. warning - # 3. high - # 4. medium - # 5. low - # Either they are sorted alphabetically. - # - # Default: ["file"] - sort-order: - - linter - - severity - - file # filepath, line, and column. + disable-all: true + # Enable specific linter + # https://golangci-lint.run/usage/linters/#enabled-by-default + enable: + - asasalint + - asciicheck + - bidichk + - bodyclose + - canonicalheader + - containedctx + - contextcheck + - copyloopvar + - cyclop + - decorder + - depguard + - dogsled + - dupl + - dupword + - durationcheck + - err113 + - errcheck + - errchkjson + - errname + - errorlint + - execinquery + - exhaustive + - exhaustruct + - exportloopref + - fatcontext + - forbidigo + - forcetypeassert + - funlen + - gci + - ginkgolinter + - gocheckcompilerdirectives + - gochecknoglobals + - gochecknoinits + - gochecksumtype + - gocognit + - goconst + - gocritic + - gocyclo + - godot + - godox + - gofmt + - gofumpt + - goheader + - goimports + - gomoddirectives + - gomodguard + - goprintffuncname + - gosec + - gosimple + - gosmopolitan + - govet + - grouper + - importas + - inamedparam + - ineffassign + - interfacebloat + - intrange + - ireturn + - lll + - loggercheck + - maintidx + - makezero + - mirror + - misspell + - mnd + - musttag + - nakedret + - nestif + - nilerr + - nilnil + - nlreturn + - noctx + - nolintlint + - nonamedreturns + - nosprintfhostport + - paralleltest + - perfsprint + - prealloc + - predeclared + - promlinter + - protogetter + - reassign + - recvcheck + - revive + - rowserrcheck + - sloglint + - spancheck + - sqlclosecheck + - staticcheck + - stylecheck + - tagalign + - tagliatelle + - tenv + - testableexamples + - testifylint + - testpackage + - thelper + - tparallel + - unconvert + - unparam + - unused + - usestdlibvars + - varnamelen + - wastedassign + - whitespace + - wrapcheck + - wsl + - zerologlint - # Show statistics per linter. + # Enable all available linters. # Default: false - show-stats: true - - -# All available settings of specific linters. -linters-settings: - asasalint: - # To specify a set of function names to exclude. - # The values are merged with the builtin exclusions. - # The builtin exclusions can be disabled by setting `use-builtin-exclusions` to `false`. - # Default: ["^(fmt|log|logger|t|)\.(Print|Fprint|Sprint|Fatal|Panic|Error|Warn|Warning|Info|Debug|Log)(|f|ln)$"] - exclude: - - Append - - \.Wrapf - # To enable/disable the asasalint builtin exclusions of function names. - # See the default value of `exclude` to get the builtin exclusions. - # Default: true + enable-all: true + # Disable specific linter + # https://golangci-lint.run/usage/linters/#disabled-by-default + disable: + - asasalint + - asciicheck + - bidichk + - bodyclose + - canonicalheader + - containedctx + - contextcheck + - copyloopvar + - cyclop + - decorder + - depguard + - dogsled + - dupl + - dupword + - durationcheck + - err113 + - errcheck + - errchkjson + - errname + - errorlint + - execinquery + - exhaustive + - exhaustruct + - exportloopref + - fatcontext + - forbidigo + - forcetypeassert + - funlen + - gci + - ginkgolinter + - gocheckcompilerdirectives + - gochecknoglobals + - gochecknoinits + - gochecksumtype + - gocognit + - goconst + - gocritic + - gocyclo + - godot + - godox + - gofmt + - gofumpt + - goheader + - goimports + - gomoddirectives + - gomodguard + - goprintffuncname + - gosec + - gosimple + - gosmopolitan + - govet + - grouper + - importas + - inamedparam + - ineffassign + - interfacebloat + - intrange + - ireturn + - lll + - loggercheck + - maintidx + - makezero + - mirror + - misspell + - mnd + - musttag + - nakedret + - nestif + - nilerr + - nilnil + - nlreturn + - noctx + - nolintlint + - nonamedreturns + - nosprintfhostport + - paralleltest + - perfsprint + - prealloc + - predeclared + - promlinter + - protogetter + - reassign + - recvcheck + - revive + - rowserrcheck + - sloglint + - spancheck + - sqlclosecheck + - staticcheck + - stylecheck + - tagalign + - tagliatelle + - tenv + - testableexamples + - testifylint + - testpackage + - thelper + - tparallel + - unconvert + - unparam + - unused + - usestdlibvars + - varnamelen + - wastedassign + - whitespace + - wrapcheck + - wsl + - zerologlint + - deadcode # Deprecated + - exhaustivestruct # Deprecated + - golint # Deprecated + - ifshort # Deprecated + - interfacer # Deprecated + - maligned # Deprecated + - gomnd # Deprecated + - nosnakecase # Deprecated + - scopelint # Deprecated + - structcheck # Deprecated + - varcheck # Deprecated + + # Enable presets. + # https://golangci-lint.run/usage/linters + # Default: [] + presets: + - bugs + - comment + - complexity + - error + - format + - import + - metalinter + - module + - performance + - sql + - style + - test + - unused + + # Enable only fast linters from enabled linters set (first run won't be fast) + # Default: false + fast: true + + +# All available settings of specific linters. +linters-settings: + asasalint: + # To specify a set of function names to exclude. + # The values are merged with the builtin exclusions. + # The builtin exclusions can be disabled by setting `use-builtin-exclusions` to `false`. + # Default: ["^(fmt|log|logger|t|)\.(Print|Fprint|Sprint|Fatal|Panic|Error|Warn|Warning|Info|Debug|Log)(|f|ln)$"] + exclude: + - Append + - \.Wrapf + # To enable/disable the asasalint builtin exclusions of function names. + # See the default value of `exclude` to get the builtin exclusions. + # Default: true use-builtin-exclusions: false # Ignore *_test.go files. # Default: false @@ -3409,378 +3543,113 @@ linters-settings: # An array of strings that specify regular expressions of signatures to ignore. # Default: [] ignoreSigRegexps: - - \.New.*Error\( - # An array of strings that specify globs of packages to ignore. - # Default: [] - ignorePackageGlobs: - - encoding/* - - github.com/pkg/* - # An array of strings that specify regular expressions of interfaces to ignore. - # Default: [] - ignoreInterfaceRegexps: - - ^(?i)c(?-i)ach(ing|e) - - wsl: - # Do strict checking when assigning from append (x = append(x, y)). - # If this is set to true - the append call must append either a variable - # assigned, called or used on the line above. - # https://github.com/bombsimon/wsl/blob/master/doc/configuration.md#strict-append - # Default: true - strict-append: false - - # Allows assignments to be cuddled with variables used in calls on - # line above and calls to be cuddled with assignments of variables - # used in call on line above. - # https://github.com/bombsimon/wsl/blob/master/doc/configuration.md#allow-assign-and-call - # Default: true - allow-assign-and-call: false - - # Allows assignments to be cuddled with anything. - # https://github.com/bombsimon/wsl/blob/master/doc/configuration.md#allow-assign-and-anything - # Default: false - allow-assign-and-anything: true - - # Allows cuddling to assignments even if they span over multiple lines. - # https://github.com/bombsimon/wsl/blob/master/doc/configuration.md#allow-multiline-assign - # Default: true - allow-multiline-assign: false - - # If the number of lines in a case block is equal to or lager than this number, - # the case *must* end white a newline. - # https://github.com/bombsimon/wsl/blob/master/doc/configuration.md#force-case-trailing-whitespace - # Default: 0 - force-case-trailing-whitespace: 1 - - # Allow blocks to end with comments. - # https://github.com/bombsimon/wsl/blob/master/doc/configuration.md#allow-trailing-comment - # Default: false - allow-trailing-comment: true - - # Allow multiple comments in the beginning of a block separated with newline. - # https://github.com/bombsimon/wsl/blob/master/doc/configuration.md#allow-separated-leading-comment - # Default: false - allow-separated-leading-comment: true - - # Allow multiple var/declaration statements to be cuddled. - # https://github.com/bombsimon/wsl/blob/master/doc/configuration.md#allow-cuddle-declarations - # Default: false - allow-cuddle-declarations: true - - # A list of call idents that everything can be cuddled with. - # Defaults: [ "Lock", "RLock" ] - allow-cuddle-with-calls: [ "Foo", "Bar" ] - - # AllowCuddleWithRHS is a list of right hand side variables that is allowed - # to be cuddled with anything. - # Defaults: [ "Unlock", "RUnlock" ] - allow-cuddle-with-rhs: [ "Foo", "Bar" ] - - # Causes an error when an If statement that checks an error variable doesn't - # cuddle with the assignment of that variable. - # https://github.com/bombsimon/wsl/blob/master/doc/configuration.md#force-err-cuddling - # Default: false - force-err-cuddling: true - - # When force-err-cuddling is enabled this is a list of names - # used for error variables to check for in the conditional. - # Default: [ "err" ] - error-variable-names: [ "foo" ] - - # Causes an error if a short declaration (:=) cuddles with anything other than - # another short declaration. - # This logic overrides force-err-cuddling among others. - # https://github.com/bombsimon/wsl/blob/master/doc/configuration.md#force-short-decl-cuddling - # Default: false - force-short-decl-cuddling: true - - # The custom section can be used to define linter plugins to be loaded at runtime. - # See README documentation for more info. - custom: - # Each custom linter should have a unique name. - example: - # The plugin type. - # It can be `goplugin` or `module`. - # Default: goplugin - type: module - # The path to the plugin *.so. Can be absolute or local. - # Required for each custom linter. - path: /path/to/example.so - # The description of the linter. - # Optional. - description: This is an example usage of a plugin linter. - # Intended to point to the repo location of the linter. - # Optional. - original-url: github.com/golangci/example-linter - # Plugins settings/configuration. - # Only work with plugin based on `linterdb.PluginConstructor`. - # Optional. - settings: - foo: bar - - -linters: - # Disable all linters. - # Default: false - disable-all: true - # Enable specific linter - # https://golangci-lint.run/usage/linters/#enabled-by-default - enable: - - asasalint - - asciicheck - - bidichk - - bodyclose - - canonicalheader - - containedctx - - contextcheck - - copyloopvar - - cyclop - - decorder - - depguard - - dogsled - - dupl - - dupword - - durationcheck - - err113 - - errcheck - - errchkjson - - errname - - errorlint - - execinquery - - exhaustive - - exhaustruct - - exportloopref - - fatcontext - - forbidigo - - forcetypeassert - - funlen - - gci - - ginkgolinter - - gocheckcompilerdirectives - - gochecknoglobals - - gochecknoinits - - gochecksumtype - - gocognit - - goconst - - gocritic - - gocyclo - - godot - - godox - - gofmt - - gofumpt - - goheader - - goimports - - gomoddirectives - - gomodguard - - goprintffuncname - - gosec - - gosimple - - gosmopolitan - - govet - - grouper - - importas - - inamedparam - - ineffassign - - interfacebloat - - intrange - - ireturn - - lll - - loggercheck - - maintidx - - makezero - - mirror - - misspell - - mnd - - musttag - - nakedret - - nestif - - nilerr - - nilnil - - nlreturn - - noctx - - nolintlint - - nonamedreturns - - nosprintfhostport - - paralleltest - - perfsprint - - prealloc - - predeclared - - promlinter - - protogetter - - reassign - - recvcheck - - revive - - rowserrcheck - - sloglint - - spancheck - - sqlclosecheck - - staticcheck - - stylecheck - - tagalign - - tagliatelle - - tenv - - testableexamples - - testifylint - - testpackage - - thelper - - tparallel - - unconvert - - unparam - - unused - - usestdlibvars - - varnamelen - - wastedassign - - whitespace - - wrapcheck - - wsl - - zerologlint - - # Enable all available linters. - # Default: false - enable-all: true - # Disable specific linter - # https://golangci-lint.run/usage/linters/#disabled-by-default - disable: - - asasalint - - asciicheck - - bidichk - - bodyclose - - canonicalheader - - containedctx - - contextcheck - - copyloopvar - - cyclop - - decorder - - depguard - - dogsled - - dupl - - dupword - - durationcheck - - err113 - - errcheck - - errchkjson - - errname - - errorlint - - execinquery - - exhaustive - - exhaustruct - - exportloopref - - fatcontext - - forbidigo - - forcetypeassert - - funlen - - gci - - ginkgolinter - - gocheckcompilerdirectives - - gochecknoglobals - - gochecknoinits - - gochecksumtype - - gocognit - - goconst - - gocritic - - gocyclo - - godot - - godox - - gofmt - - gofumpt - - goheader - - goimports - - gomoddirectives - - gomodguard - - goprintffuncname - - gosec - - gosimple - - gosmopolitan - - govet - - grouper - - importas - - inamedparam - - ineffassign - - interfacebloat - - intrange - - ireturn - - lll - - loggercheck - - maintidx - - makezero - - mirror - - misspell - - mnd - - musttag - - nakedret - - nestif - - nilerr - - nilnil - - nlreturn - - noctx - - nolintlint - - nonamedreturns - - nosprintfhostport - - paralleltest - - perfsprint - - prealloc - - predeclared - - promlinter - - protogetter - - reassign - - recvcheck - - revive - - rowserrcheck - - sloglint - - spancheck - - sqlclosecheck - - staticcheck - - stylecheck - - tagalign - - tagliatelle - - tenv - - testableexamples - - testifylint - - testpackage - - thelper - - tparallel - - unconvert - - unparam - - unused - - usestdlibvars - - varnamelen - - wastedassign - - whitespace - - wrapcheck - - wsl - - zerologlint - - deadcode # Deprecated - - exhaustivestruct # Deprecated - - golint # Deprecated - - ifshort # Deprecated - - interfacer # Deprecated - - maligned # Deprecated - - gomnd # Deprecated - - nosnakecase # Deprecated - - scopelint # Deprecated - - structcheck # Deprecated - - varcheck # Deprecated + - \.New.*Error\( + # An array of strings that specify globs of packages to ignore. + # Default: [] + ignorePackageGlobs: + - encoding/* + - github.com/pkg/* + # An array of strings that specify regular expressions of interfaces to ignore. + # Default: [] + ignoreInterfaceRegexps: + - ^(?i)c(?-i)ach(ing|e) - # Enable presets. - # https://golangci-lint.run/usage/linters - # Default: [] - presets: - - bugs - - comment - - complexity - - error - - format - - import - - metalinter - - module - - performance - - sql - - style - - test - - unused + wsl: + # Do strict checking when assigning from append (x = append(x, y)). + # If this is set to true - the append call must append either a variable + # assigned, called or used on the line above. + # https://github.com/bombsimon/wsl/blob/master/doc/configuration.md#strict-append + # Default: true + strict-append: false - # Enable only fast linters from enabled linters set (first run won't be fast) - # Default: false - fast: true + # Allows assignments to be cuddled with variables used in calls on + # line above and calls to be cuddled with assignments of variables + # used in call on line above. + # https://github.com/bombsimon/wsl/blob/master/doc/configuration.md#allow-assign-and-call + # Default: true + allow-assign-and-call: false + + # Allows assignments to be cuddled with anything. + # https://github.com/bombsimon/wsl/blob/master/doc/configuration.md#allow-assign-and-anything + # Default: false + allow-assign-and-anything: true + + # Allows cuddling to assignments even if they span over multiple lines. + # https://github.com/bombsimon/wsl/blob/master/doc/configuration.md#allow-multiline-assign + # Default: true + allow-multiline-assign: false + + # If the number of lines in a case block is equal to or lager than this number, + # the case *must* end white a newline. + # https://github.com/bombsimon/wsl/blob/master/doc/configuration.md#force-case-trailing-whitespace + # Default: 0 + force-case-trailing-whitespace: 1 + + # Allow blocks to end with comments. + # https://github.com/bombsimon/wsl/blob/master/doc/configuration.md#allow-trailing-comment + # Default: false + allow-trailing-comment: true + + # Allow multiple comments in the beginning of a block separated with newline. + # https://github.com/bombsimon/wsl/blob/master/doc/configuration.md#allow-separated-leading-comment + # Default: false + allow-separated-leading-comment: true + + # Allow multiple var/declaration statements to be cuddled. + # https://github.com/bombsimon/wsl/blob/master/doc/configuration.md#allow-cuddle-declarations + # Default: false + allow-cuddle-declarations: true + + # A list of call idents that everything can be cuddled with. + # Defaults: [ "Lock", "RLock" ] + allow-cuddle-with-calls: [ "Foo", "Bar" ] + + # AllowCuddleWithRHS is a list of right hand side variables that is allowed + # to be cuddled with anything. + # Defaults: [ "Unlock", "RUnlock" ] + allow-cuddle-with-rhs: [ "Foo", "Bar" ] + + # Causes an error when an If statement that checks an error variable doesn't + # cuddle with the assignment of that variable. + # https://github.com/bombsimon/wsl/blob/master/doc/configuration.md#force-err-cuddling + # Default: false + force-err-cuddling: true + + # When force-err-cuddling is enabled this is a list of names + # used for error variables to check for in the conditional. + # Default: [ "err" ] + error-variable-names: [ "foo" ] + + # Causes an error if a short declaration (:=) cuddles with anything other than + # another short declaration. + # This logic overrides force-err-cuddling among others. + # https://github.com/bombsimon/wsl/blob/master/doc/configuration.md#force-short-decl-cuddling + # Default: false + force-short-decl-cuddling: true + + # The custom section can be used to define linter plugins to be loaded at runtime. + # See README documentation for more info. + custom: + # Each custom linter should have a unique name. + example: + # The plugin type. + # It can be `goplugin` or `module`. + # Default: goplugin + type: module + # The path to the plugin *.so. Can be absolute or local. + # Required for each custom linter. + path: /path/to/example.so + # The description of the linter. + # Optional. + description: This is an example usage of a plugin linter. + # Intended to point to the repo location of the linter. + # Optional. + original-url: github.com/golangci/example-linter + # Plugins settings/configuration. + # Only work with plugin based on `linterdb.PluginConstructor`. + # Optional. + settings: + foo: bar issues: @@ -3930,6 +3799,137 @@ issues: fix: true +# output configuration options +output: + # The formats used to render issues. + # Formats: + # - `colored-line-number` + # - `line-number` + # - `json` + # - `colored-tab` + # - `tab` + # - `html` + # - `checkstyle` + # - `code-climate` + # - `junit-xml` + # - `junit-xml-extended` + # - `github-actions` + # - `teamcity` + # - `sarif` + # Output path can be either `stdout`, `stderr` or path to the file to write to. + # + # For the CLI flag (`--out-format`), multiple formats can be specified by separating them by comma. + # The output can be specified for each of them by separating format name and path by colon symbol. + # Example: "--out-format=checkstyle:report.xml,json:stdout,colored-line-number" + # The CLI flag (`--out-format`) override the configuration file. + # + # Default: + # formats: + # - format: colored-line-number + # path: stdout + formats: + - format: json + path: stderr + - format: checkstyle + path: report.xml + - format: colored-line-number + + # Print lines of code with issue. + # Default: true + print-issued-lines: false + + # Print linter name in the end of issue text. + # Default: true + print-linter-name: false + + # Make issues output unique by line. + # Default: true + uniq-by-line: false + + # Add a prefix to the output file references. + # Default: "" + path-prefix: "" + + # Sort results by the order defined in `sort-order`. + # Default: false + sort-results: true + + # Order to use when sorting results. + # Require `sort-results` to `true`. + # Possible values: `file`, `linter`, and `severity`. + # + # If the severity values are inside the following list, they are ordered in this order: + # 1. error + # 2. warning + # 3. high + # 4. medium + # 5. low + # Either they are sorted alphabetically. + # + # Default: ["file"] + sort-order: + - linter + - severity + - file # filepath, line, and column. + + # Show statistics per linter. + # Default: false + show-stats: true + + +# Options for analysis running. +run: + # Timeout for analysis, e.g. 30s, 5m. + # Default: 1m + timeout: 5m + + # Exit code when at least one issue was found. + # Default: 1 + issues-exit-code: 2 + + # Include test files or not. + # Default: true + tests: false + + # List of build tags, all linters use it. + # Default: [] + build-tags: + - mytag + + # If set, we pass it to "go list -mod={option}". From "go help modules": + # If invoked with -mod=readonly, the go command is disallowed from the implicit + # automatic updating of go.mod described above. Instead, it fails when any changes + # to go.mod are needed. This setting is most useful to check that go.mod does + # not need updates, such as in a continuous integration and testing system. + # If invoked with -mod=vendor, the go command assumes that the vendor + # directory holds the correct copies of dependencies and ignores + # the dependency descriptions in go.mod. + # + # Allowed values: readonly|vendor|mod + # Default: "" + modules-download-mode: readonly + + # Allow multiple parallel golangci-lint instances running. + # If false, golangci-lint acquires file lock on start. + # Default: false + allow-parallel-runners: true + + # Allow multiple golangci-lint instances running, but serialize them around a lock. + # If false, golangci-lint exits with an error if it fails to acquire file lock on start. + # Default: false + allow-serial-runners: true + + # Define the Go version limit. + # Mainly related to generics support since go1.18. + # Default: use Go version from the go.mod file, fallback on the env var `GOVERSION`, fallback on 1.17 + go: '1.19' + + # Number of operating system threads (`GOMAXPROCS`) that can execute golangci-lint simultaneously. + # 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. + # Default: the number of logical CPUs in the machine + concurrency: 4 + + severity: # Set the default severity for issues. # diff --git a/.golangci.reference.yml b/.golangci.reference.yml index f17a251cd270..6e761820e7f3 100644 --- a/.golangci.reference.yml +++ b/.golangci.reference.yml @@ -4,152 +4,285 @@ # This file is not a configuration example, # it contains the exhaustive configuration with explanations of the options. -# Options for analysis running. -run: - # Number of operating system threads (`GOMAXPROCS`) that can execute golangci-lint simultaneously. - # 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. - # Default: the number of logical CPUs in the machine - concurrency: 4 - - # Timeout for analysis, e.g. 30s, 5m. - # Default: 1m - timeout: 5m - - # Exit code when at least one issue was found. - # Default: 1 - issues-exit-code: 2 - - # Include test files or not. - # Default: true - tests: false - - # List of build tags, all linters use it. - # Default: [] - build-tags: - - mytag - - # If set, we pass it to "go list -mod={option}". From "go help modules": - # If invoked with -mod=readonly, the go command is disallowed from the implicit - # automatic updating of go.mod described above. Instead, it fails when any changes - # to go.mod are needed. This setting is most useful to check that go.mod does - # not need updates, such as in a continuous integration and testing system. - # If invoked with -mod=vendor, the go command assumes that the vendor - # directory holds the correct copies of dependencies and ignores - # the dependency descriptions in go.mod. - # - # Allowed values: readonly|vendor|mod - # Default: "" - modules-download-mode: readonly - - # Allow multiple parallel golangci-lint instances running. - # If false, golangci-lint acquires file lock on start. - # Default: false - allow-parallel-runners: true - - # Allow multiple golangci-lint instances running, but serialize them around a lock. - # If false, golangci-lint exits with an error if it fails to acquire file lock on start. - # Default: false - allow-serial-runners: true - - # Define the Go version limit. - # Mainly related to generics support since go1.18. - # Default: use Go version from the go.mod file, fallback on the env var `GOVERSION`, fallback on 1.17 - go: '1.19' - - -# output configuration options -output: - # The formats used to render issues. - # Formats: - # - `colored-line-number` - # - `line-number` - # - `json` - # - `colored-tab` - # - `tab` - # - `html` - # - `checkstyle` - # - `code-climate` - # - `junit-xml` - # - `junit-xml-extended` - # - `github-actions` - # - `teamcity` - # - `sarif` - # Output path can be either `stdout`, `stderr` or path to the file to write to. - # - # For the CLI flag (`--out-format`), multiple formats can be specified by separating them by comma. - # The output can be specified for each of them by separating format name and path by colon symbol. - # Example: "--out-format=checkstyle:report.xml,json:stdout,colored-line-number" - # The CLI flag (`--out-format`) override the configuration file. - # - # Default: - # formats: - # - format: colored-line-number - # path: stdout - formats: - - format: json - path: stderr - - format: checkstyle - path: report.xml - - format: colored-line-number - - # Print lines of code with issue. - # Default: true - print-issued-lines: false - - # Print linter name in the end of issue text. - # Default: true - print-linter-name: false - - # Make issues output unique by line. - # Default: true - uniq-by-line: false - - # Add a prefix to the output file references. - # Default: "" - path-prefix: "" - # Sort results by the order defined in `sort-order`. +linters: + # Disable all linters. # Default: false - sort-results: true - - # Order to use when sorting results. - # Require `sort-results` to `true`. - # Possible values: `file`, `linter`, and `severity`. - # - # If the severity values are inside the following list, they are ordered in this order: - # 1. error - # 2. warning - # 3. high - # 4. medium - # 5. low - # Either they are sorted alphabetically. - # - # Default: ["file"] - sort-order: - - linter - - severity - - file # filepath, line, and column. + disable-all: true + # Enable specific linter + # https://golangci-lint.run/usage/linters/#enabled-by-default + enable: + - asasalint + - asciicheck + - bidichk + - bodyclose + - canonicalheader + - containedctx + - contextcheck + - copyloopvar + - cyclop + - decorder + - depguard + - dogsled + - dupl + - dupword + - durationcheck + - err113 + - errcheck + - errchkjson + - errname + - errorlint + - execinquery + - exhaustive + - exhaustruct + - exportloopref + - fatcontext + - forbidigo + - forcetypeassert + - funlen + - gci + - ginkgolinter + - gocheckcompilerdirectives + - gochecknoglobals + - gochecknoinits + - gochecksumtype + - gocognit + - goconst + - gocritic + - gocyclo + - godot + - godox + - gofmt + - gofumpt + - goheader + - goimports + - gomoddirectives + - gomodguard + - goprintffuncname + - gosec + - gosimple + - gosmopolitan + - govet + - grouper + - importas + - inamedparam + - ineffassign + - interfacebloat + - intrange + - ireturn + - lll + - loggercheck + - maintidx + - makezero + - mirror + - misspell + - mnd + - musttag + - nakedret + - nestif + - nilerr + - nilnil + - nlreturn + - noctx + - nolintlint + - nonamedreturns + - nosprintfhostport + - paralleltest + - perfsprint + - prealloc + - predeclared + - promlinter + - protogetter + - reassign + - revive + - rowserrcheck + - sloglint + - spancheck + - sqlclosecheck + - staticcheck + - stylecheck + - tagalign + - tagliatelle + - tenv + - testableexamples + - testifylint + - testpackage + - thelper + - tparallel + - unconvert + - unparam + - unused + - usestdlibvars + - varnamelen + - wastedassign + - whitespace + - wrapcheck + - wsl + - zerologlint - # Show statistics per linter. + # Enable all available linters. # Default: false - show-stats: true - - -# All available settings of specific linters. -linters-settings: - asasalint: - # To specify a set of function names to exclude. - # The values are merged with the builtin exclusions. - # The builtin exclusions can be disabled by setting `use-builtin-exclusions` to `false`. - # Default: ["^(fmt|log|logger|t|)\.(Print|Fprint|Sprint|Fatal|Panic|Error|Warn|Warning|Info|Debug|Log)(|f|ln)$"] - exclude: - - Append - - \.Wrapf - # To enable/disable the asasalint builtin exclusions of function names. - # See the default value of `exclude` to get the builtin exclusions. - # Default: true - use-builtin-exclusions: false - # Ignore *_test.go files. + enable-all: true + # Disable specific linter + # https://golangci-lint.run/usage/linters/#disabled-by-default + disable: + - asasalint + - asciicheck + - bidichk + - bodyclose + - canonicalheader + - containedctx + - contextcheck + - copyloopvar + - cyclop + - decorder + - depguard + - dogsled + - dupl + - dupword + - durationcheck + - err113 + - errcheck + - errchkjson + - errname + - errorlint + - execinquery + - exhaustive + - exhaustruct + - exportloopref + - fatcontext + - forbidigo + - forcetypeassert + - funlen + - gci + - ginkgolinter + - gocheckcompilerdirectives + - gochecknoglobals + - gochecknoinits + - gochecksumtype + - gocognit + - goconst + - gocritic + - gocyclo + - godot + - godox + - gofmt + - gofumpt + - goheader + - goimports + - gomoddirectives + - gomodguard + - goprintffuncname + - gosec + - gosimple + - gosmopolitan + - govet + - grouper + - importas + - inamedparam + - ineffassign + - interfacebloat + - intrange + - ireturn + - lll + - loggercheck + - maintidx + - makezero + - mirror + - misspell + - mnd + - musttag + - nakedret + - nestif + - nilerr + - nilnil + - nlreturn + - noctx + - nolintlint + - nonamedreturns + - nosprintfhostport + - paralleltest + - perfsprint + - prealloc + - predeclared + - promlinter + - protogetter + - reassign + - revive + - rowserrcheck + - sloglint + - spancheck + - sqlclosecheck + - staticcheck + - stylecheck + - tagalign + - tagliatelle + - tenv + - testableexamples + - testifylint + - testpackage + - thelper + - tparallel + - unconvert + - unparam + - unused + - usestdlibvars + - varnamelen + - wastedassign + - whitespace + - wrapcheck + - wsl + - zerologlint + - deadcode # Deprecated + - exhaustivestruct # Deprecated + - golint # Deprecated + - ifshort # Deprecated + - interfacer # Deprecated + - maligned # Deprecated + - gomnd # Deprecated + - nosnakecase # Deprecated + - scopelint # Deprecated + - structcheck # Deprecated + - varcheck # Deprecated + + # Enable presets. + # https://golangci-lint.run/usage/linters + # Default: [] + presets: + - bugs + - comment + - complexity + - error + - format + - import + - metalinter + - module + - performance + - sql + - style + - test + - unused + + # Enable only fast linters from enabled linters set (first run won't be fast) + # Default: false + fast: true + + +# All available settings of specific linters. +linters-settings: + asasalint: + # To specify a set of function names to exclude. + # The values are merged with the builtin exclusions. + # The builtin exclusions can be disabled by setting `use-builtin-exclusions` to `false`. + # Default: ["^(fmt|log|logger|t|)\.(Print|Fprint|Sprint|Fatal|Panic|Error|Warn|Warning|Info|Debug|Log)(|f|ln)$"] + exclude: + - Append + - \.Wrapf + # To enable/disable the asasalint builtin exclusions of function names. + # See the default value of `exclude` to get the builtin exclusions. + # Default: true + use-builtin-exclusions: false + # Ignore *_test.go files. # Default: false ignore-test: true @@ -2491,376 +2624,113 @@ linters-settings: # An array of strings that specify regular expressions of signatures to ignore. # Default: [] ignoreSigRegexps: - - \.New.*Error\( - # An array of strings that specify globs of packages to ignore. - # Default: [] - ignorePackageGlobs: - - encoding/* - - github.com/pkg/* - # An array of strings that specify regular expressions of interfaces to ignore. - # Default: [] - ignoreInterfaceRegexps: - - ^(?i)c(?-i)ach(ing|e) - - wsl: - # Do strict checking when assigning from append (x = append(x, y)). - # If this is set to true - the append call must append either a variable - # assigned, called or used on the line above. - # https://github.com/bombsimon/wsl/blob/master/doc/configuration.md#strict-append - # Default: true - strict-append: false - - # Allows assignments to be cuddled with variables used in calls on - # line above and calls to be cuddled with assignments of variables - # used in call on line above. - # https://github.com/bombsimon/wsl/blob/master/doc/configuration.md#allow-assign-and-call - # Default: true - allow-assign-and-call: false - - # Allows assignments to be cuddled with anything. - # https://github.com/bombsimon/wsl/blob/master/doc/configuration.md#allow-assign-and-anything - # Default: false - allow-assign-and-anything: true - - # Allows cuddling to assignments even if they span over multiple lines. - # https://github.com/bombsimon/wsl/blob/master/doc/configuration.md#allow-multiline-assign - # Default: true - allow-multiline-assign: false - - # If the number of lines in a case block is equal to or lager than this number, - # the case *must* end white a newline. - # https://github.com/bombsimon/wsl/blob/master/doc/configuration.md#force-case-trailing-whitespace - # Default: 0 - force-case-trailing-whitespace: 1 - - # Allow blocks to end with comments. - # https://github.com/bombsimon/wsl/blob/master/doc/configuration.md#allow-trailing-comment - # Default: false - allow-trailing-comment: true - - # Allow multiple comments in the beginning of a block separated with newline. - # https://github.com/bombsimon/wsl/blob/master/doc/configuration.md#allow-separated-leading-comment - # Default: false - allow-separated-leading-comment: true - - # Allow multiple var/declaration statements to be cuddled. - # https://github.com/bombsimon/wsl/blob/master/doc/configuration.md#allow-cuddle-declarations - # Default: false - allow-cuddle-declarations: true - - # A list of call idents that everything can be cuddled with. - # Defaults: [ "Lock", "RLock" ] - allow-cuddle-with-calls: [ "Foo", "Bar" ] - - # AllowCuddleWithRHS is a list of right hand side variables that is allowed - # to be cuddled with anything. - # Defaults: [ "Unlock", "RUnlock" ] - allow-cuddle-with-rhs: [ "Foo", "Bar" ] - - # Causes an error when an If statement that checks an error variable doesn't - # cuddle with the assignment of that variable. - # https://github.com/bombsimon/wsl/blob/master/doc/configuration.md#force-err-cuddling - # Default: false - force-err-cuddling: true - - # When force-err-cuddling is enabled this is a list of names - # used for error variables to check for in the conditional. - # Default: [ "err" ] - error-variable-names: [ "foo" ] - - # Causes an error if a short declaration (:=) cuddles with anything other than - # another short declaration. - # This logic overrides force-err-cuddling among others. - # https://github.com/bombsimon/wsl/blob/master/doc/configuration.md#force-short-decl-cuddling - # Default: false - force-short-decl-cuddling: true - - # The custom section can be used to define linter plugins to be loaded at runtime. - # See README documentation for more info. - custom: - # Each custom linter should have a unique name. - example: - # The plugin type. - # It can be `goplugin` or `module`. - # Default: goplugin - type: module - # The path to the plugin *.so. Can be absolute or local. - # Required for each custom linter. - path: /path/to/example.so - # The description of the linter. - # Optional. - description: This is an example usage of a plugin linter. - # Intended to point to the repo location of the linter. - # Optional. - original-url: github.com/golangci/example-linter - # Plugins settings/configuration. - # Only work with plugin based on `linterdb.PluginConstructor`. - # Optional. - settings: - foo: bar - - -linters: - # Disable all linters. - # Default: false - disable-all: true - # Enable specific linter - # https://golangci-lint.run/usage/linters/#enabled-by-default - enable: - - asasalint - - asciicheck - - bidichk - - bodyclose - - canonicalheader - - containedctx - - contextcheck - - copyloopvar - - cyclop - - decorder - - depguard - - dogsled - - dupl - - dupword - - durationcheck - - err113 - - errcheck - - errchkjson - - errname - - errorlint - - execinquery - - exhaustive - - exhaustruct - - exportloopref - - fatcontext - - forbidigo - - forcetypeassert - - funlen - - gci - - ginkgolinter - - gocheckcompilerdirectives - - gochecknoglobals - - gochecknoinits - - gochecksumtype - - gocognit - - goconst - - gocritic - - gocyclo - - godot - - godox - - gofmt - - gofumpt - - goheader - - goimports - - gomoddirectives - - gomodguard - - goprintffuncname - - gosec - - gosimple - - gosmopolitan - - govet - - grouper - - importas - - inamedparam - - ineffassign - - interfacebloat - - intrange - - ireturn - - lll - - loggercheck - - maintidx - - makezero - - mirror - - misspell - - mnd - - musttag - - nakedret - - nestif - - nilerr - - nilnil - - nlreturn - - noctx - - nolintlint - - nonamedreturns - - nosprintfhostport - - paralleltest - - perfsprint - - prealloc - - predeclared - - promlinter - - protogetter - - reassign - - revive - - rowserrcheck - - sloglint - - spancheck - - sqlclosecheck - - staticcheck - - stylecheck - - tagalign - - tagliatelle - - tenv - - testableexamples - - testifylint - - testpackage - - thelper - - tparallel - - unconvert - - unparam - - unused - - usestdlibvars - - varnamelen - - wastedassign - - whitespace - - wrapcheck - - wsl - - zerologlint - - # Enable all available linters. - # Default: false - enable-all: true - # Disable specific linter - # https://golangci-lint.run/usage/linters/#disabled-by-default - disable: - - asasalint - - asciicheck - - bidichk - - bodyclose - - canonicalheader - - containedctx - - contextcheck - - copyloopvar - - cyclop - - decorder - - depguard - - dogsled - - dupl - - dupword - - durationcheck - - err113 - - errcheck - - errchkjson - - errname - - errorlint - - execinquery - - exhaustive - - exhaustruct - - exportloopref - - fatcontext - - forbidigo - - forcetypeassert - - funlen - - gci - - ginkgolinter - - gocheckcompilerdirectives - - gochecknoglobals - - gochecknoinits - - gochecksumtype - - gocognit - - goconst - - gocritic - - gocyclo - - godot - - godox - - gofmt - - gofumpt - - goheader - - goimports - - gomoddirectives - - gomodguard - - goprintffuncname - - gosec - - gosimple - - gosmopolitan - - govet - - grouper - - importas - - inamedparam - - ineffassign - - interfacebloat - - intrange - - ireturn - - lll - - loggercheck - - maintidx - - makezero - - mirror - - misspell - - mnd - - musttag - - nakedret - - nestif - - nilerr - - nilnil - - nlreturn - - noctx - - nolintlint - - nonamedreturns - - nosprintfhostport - - paralleltest - - perfsprint - - prealloc - - predeclared - - promlinter - - protogetter - - reassign - - revive - - rowserrcheck - - sloglint - - spancheck - - sqlclosecheck - - staticcheck - - stylecheck - - tagalign - - tagliatelle - - tenv - - testableexamples - - testifylint - - testpackage - - thelper - - tparallel - - unconvert - - unparam - - unused - - usestdlibvars - - varnamelen - - wastedassign - - whitespace - - wrapcheck - - wsl - - zerologlint - - deadcode # Deprecated - - exhaustivestruct # Deprecated - - golint # Deprecated - - ifshort # Deprecated - - interfacer # Deprecated - - maligned # Deprecated - - gomnd # Deprecated - - nosnakecase # Deprecated - - scopelint # Deprecated - - structcheck # Deprecated - - varcheck # Deprecated + - \.New.*Error\( + # An array of strings that specify globs of packages to ignore. + # Default: [] + ignorePackageGlobs: + - encoding/* + - github.com/pkg/* + # An array of strings that specify regular expressions of interfaces to ignore. + # Default: [] + ignoreInterfaceRegexps: + - ^(?i)c(?-i)ach(ing|e) - # Enable presets. - # https://golangci-lint.run/usage/linters - # Default: [] - presets: - - bugs - - comment - - complexity - - error - - format - - import - - metalinter - - module - - performance - - sql - - style - - test - - unused + wsl: + # Do strict checking when assigning from append (x = append(x, y)). + # If this is set to true - the append call must append either a variable + # assigned, called or used on the line above. + # https://github.com/bombsimon/wsl/blob/master/doc/configuration.md#strict-append + # Default: true + strict-append: false - # Enable only fast linters from enabled linters set (first run won't be fast) - # Default: false - fast: true + # Allows assignments to be cuddled with variables used in calls on + # line above and calls to be cuddled with assignments of variables + # used in call on line above. + # https://github.com/bombsimon/wsl/blob/master/doc/configuration.md#allow-assign-and-call + # Default: true + allow-assign-and-call: false + + # Allows assignments to be cuddled with anything. + # https://github.com/bombsimon/wsl/blob/master/doc/configuration.md#allow-assign-and-anything + # Default: false + allow-assign-and-anything: true + + # Allows cuddling to assignments even if they span over multiple lines. + # https://github.com/bombsimon/wsl/blob/master/doc/configuration.md#allow-multiline-assign + # Default: true + allow-multiline-assign: false + + # If the number of lines in a case block is equal to or lager than this number, + # the case *must* end white a newline. + # https://github.com/bombsimon/wsl/blob/master/doc/configuration.md#force-case-trailing-whitespace + # Default: 0 + force-case-trailing-whitespace: 1 + + # Allow blocks to end with comments. + # https://github.com/bombsimon/wsl/blob/master/doc/configuration.md#allow-trailing-comment + # Default: false + allow-trailing-comment: true + + # Allow multiple comments in the beginning of a block separated with newline. + # https://github.com/bombsimon/wsl/blob/master/doc/configuration.md#allow-separated-leading-comment + # Default: false + allow-separated-leading-comment: true + + # Allow multiple var/declaration statements to be cuddled. + # https://github.com/bombsimon/wsl/blob/master/doc/configuration.md#allow-cuddle-declarations + # Default: false + allow-cuddle-declarations: true + + # A list of call idents that everything can be cuddled with. + # Defaults: [ "Lock", "RLock" ] + allow-cuddle-with-calls: [ "Foo", "Bar" ] + + # AllowCuddleWithRHS is a list of right hand side variables that is allowed + # to be cuddled with anything. + # Defaults: [ "Unlock", "RUnlock" ] + allow-cuddle-with-rhs: [ "Foo", "Bar" ] + + # Causes an error when an If statement that checks an error variable doesn't + # cuddle with the assignment of that variable. + # https://github.com/bombsimon/wsl/blob/master/doc/configuration.md#force-err-cuddling + # Default: false + force-err-cuddling: true + + # When force-err-cuddling is enabled this is a list of names + # used for error variables to check for in the conditional. + # Default: [ "err" ] + error-variable-names: [ "foo" ] + + # Causes an error if a short declaration (:=) cuddles with anything other than + # another short declaration. + # This logic overrides force-err-cuddling among others. + # https://github.com/bombsimon/wsl/blob/master/doc/configuration.md#force-short-decl-cuddling + # Default: false + force-short-decl-cuddling: true + + # The custom section can be used to define linter plugins to be loaded at runtime. + # See README documentation for more info. + custom: + # Each custom linter should have a unique name. + example: + # The plugin type. + # It can be `goplugin` or `module`. + # Default: goplugin + type: module + # The path to the plugin *.so. Can be absolute or local. + # Required for each custom linter. + path: /path/to/example.so + # The description of the linter. + # Optional. + description: This is an example usage of a plugin linter. + # Intended to point to the repo location of the linter. + # Optional. + original-url: github.com/golangci/example-linter + # Plugins settings/configuration. + # Only work with plugin based on `linterdb.PluginConstructor`. + # Optional. + settings: + foo: bar issues: @@ -3010,6 +2880,137 @@ issues: fix: true +# output configuration options +output: + # The formats used to render issues. + # Formats: + # - `colored-line-number` + # - `line-number` + # - `json` + # - `colored-tab` + # - `tab` + # - `html` + # - `checkstyle` + # - `code-climate` + # - `junit-xml` + # - `junit-xml-extended` + # - `github-actions` + # - `teamcity` + # - `sarif` + # Output path can be either `stdout`, `stderr` or path to the file to write to. + # + # For the CLI flag (`--out-format`), multiple formats can be specified by separating them by comma. + # The output can be specified for each of them by separating format name and path by colon symbol. + # Example: "--out-format=checkstyle:report.xml,json:stdout,colored-line-number" + # The CLI flag (`--out-format`) override the configuration file. + # + # Default: + # formats: + # - format: colored-line-number + # path: stdout + formats: + - format: json + path: stderr + - format: checkstyle + path: report.xml + - format: colored-line-number + + # Print lines of code with issue. + # Default: true + print-issued-lines: false + + # Print linter name in the end of issue text. + # Default: true + print-linter-name: false + + # Make issues output unique by line. + # Default: true + uniq-by-line: false + + # Add a prefix to the output file references. + # Default: "" + path-prefix: "" + + # Sort results by the order defined in `sort-order`. + # Default: false + sort-results: true + + # Order to use when sorting results. + # Require `sort-results` to `true`. + # Possible values: `file`, `linter`, and `severity`. + # + # If the severity values are inside the following list, they are ordered in this order: + # 1. error + # 2. warning + # 3. high + # 4. medium + # 5. low + # Either they are sorted alphabetically. + # + # Default: ["file"] + sort-order: + - linter + - severity + - file # filepath, line, and column. + + # Show statistics per linter. + # Default: false + show-stats: true + + +# Options for analysis running. +run: + # Timeout for analysis, e.g. 30s, 5m. + # Default: 1m + timeout: 5m + + # Exit code when at least one issue was found. + # Default: 1 + issues-exit-code: 2 + + # Include test files or not. + # Default: true + tests: false + + # List of build tags, all linters use it. + # Default: [] + build-tags: + - mytag + + # If set, we pass it to "go list -mod={option}". From "go help modules": + # If invoked with -mod=readonly, the go command is disallowed from the implicit + # automatic updating of go.mod described above. Instead, it fails when any changes + # to go.mod are needed. This setting is most useful to check that go.mod does + # not need updates, such as in a continuous integration and testing system. + # If invoked with -mod=vendor, the go command assumes that the vendor + # directory holds the correct copies of dependencies and ignores + # the dependency descriptions in go.mod. + # + # Allowed values: readonly|vendor|mod + # Default: "" + modules-download-mode: readonly + + # Allow multiple parallel golangci-lint instances running. + # If false, golangci-lint acquires file lock on start. + # Default: false + allow-parallel-runners: true + + # Allow multiple golangci-lint instances running, but serialize them around a lock. + # If false, golangci-lint exits with an error if it fails to acquire file lock on start. + # Default: false + allow-serial-runners: true + + # Define the Go version limit. + # Mainly related to generics support since go1.18. + # Default: use Go version from the go.mod file, fallback on the env var `GOVERSION`, fallback on 1.17 + go: '1.19' + + # Number of operating system threads (`GOMAXPROCS`) that can execute golangci-lint simultaneously. + # 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. + # Default: the number of logical CPUs in the machine + concurrency: 4 + + severity: # Set the default severity for issues. #