chore: migrate .golangci.toml

Amolith created

Change summary

.golangci.toml | 226 ++++++++++++++++++++++++++++-----------------------
1 file changed, 123 insertions(+), 103 deletions(-)

Detailed changes

.golangci.toml 🔗

@@ -2,113 +2,133 @@
 #
 # SPDX-License-Identifier: CC0-1.0
 
+version = '2'
+
 [run]
-concurrency            =  8
-timeout                =  "30m"
-issues-exit-code       =  1
-tests                  =  true
-modules-download-mode  =  "readonly"
-go                     =  ""
+concurrency = 8
+go = ''
+modules-download-mode = 'readonly'
+issues-exit-code = 1
+tests = true
 
 [output]
-print-issued-lines  =  false
-print-linter-name   =  true
-uniq-by-line        =  false
-path-prefix         =  ""
-sort-results        =  true
+path-prefix = ''
+
+[linters]
+enable = [
+  'asasalint',
+  'asciicheck',
+  'bidichk',
+  'bodyclose',
+  'containedctx',
+  'contextcheck',
+  'cyclop',
+  'decorder',
+  'depguard',
+  'dogsled',
+  'dupl',
+  'dupword',
+  'durationcheck',
+  'err113',
+  'errchkjson',
+  'errname',
+  'errorlint',
+  'exhaustive',
+  'exhaustruct',
+  'forcetypeassert',
+  'funlen',
+  'gocheckcompilerdirectives',
+  'gocognit',
+  'gocritic',
+  'gocyclo',
+  'godot',
+  'godox',
+  'gomoddirectives',
+  'gomodguard',
+  'goprintffuncname',
+  'gosec',
+  'grouper',
+  'importas',
+  'interfacebloat',
+  'ireturn',
+  'lll',
+  'loggercheck',
+  'maintidx',
+  'makezero',
+  'misspell',
+  'mnd',
+  'musttag',
+  'nakedret',
+  'nestif',
+  'nilerr',
+  'nilnil',
+  'noctx',
+  'nolintlint',
+  'nonamedreturns',
+  'nosprintfhostport',
+  'paralleltest',
+  'prealloc',
+  'predeclared',
+  'promlinter',
+  'reassign',
+  'revive',
+  'rowserrcheck',
+  'sqlclosecheck',
+  'staticcheck',
+  'tagliatelle',
+  'testableexamples',
+  'testpackage',
+  'thelper',
+  'tparallel',
+  'unconvert',
+  'unparam',
+  'usestdlibvars',
+  'varnamelen',
+  'wastedassign',
+  'whitespace',
+  'wrapcheck',
+  'wsl_v5'
+]
+
+[linters.settings]
+  [linters.settings.wsl_v5]
+    allow-first-in-block = true
+    allow-whole-block = false
+    branch-max-lines = 2
+
+[linters.exclusions]
+generated = 'lax'
+presets = [
+  'comments',
+  'common-false-positives',
+  'legacy',
+  'std-error-handling'
+]
+paths = [
+  'frontend',
+  'third_party$',
+  'builtin$',
+  'examples$'
+]
 
 [issues]
-max-issues-per-linter  =  0
-max-same-issues        =  0
-new                    =  false
-fix                    =  false
-exclude-dirs           =  ["frontend"]
+max-issues-per-linter = 0
+max-same-issues = 0
+new = false
+fix = false
 
-[linters]
-fast    =  false
-eeable  =  [
-        "asasalint",
-        "asciicheck",
-        "bidichk",
-        "bodyclose",
-        "contextcheck",
-        "durationcheck",
-        "errcheck",
-        "errname",
-        "errorlint",
-        "exportloopref",
-        "gocritic",
-        "godot",
-        "gofumpt",
-        "goimports",
-        "gomoddirectives",
-        "gosec",
-        "gosimple",
-        "govet",
-        "ineffassign",
-        "misspell",
-        "nakedret",
-        "nilerr",
-        "nilnil",
-        "noctx",
-        "nolintlint",
-        "prealloc",
-        "predeclared",
-        "promlinter",
-        "reassign",
-        "revive",
-        "rowserrcheck",
-        "sqlclosecheck",
-        "stylecheck",
-        "tagliatelle",
-        "tenv",
-        "testableexamples",
-        "thelper",
-        "tparallel",
-        "unconvert",
-        "unparam",
-        "unused",
-        "usestdlibvars",
-        "wastedassign",
-        "containedctx",
-        "cyclop",
-        "decorder",
-        "depguard",
-        "dogsled",
-        "dupl",
-        "dupword",
-        "errchkjson",
-        "execinquery",
-        "exhaustive",
-        "exhaustruct",
-        "forcetypeassert",
-        "funlen",
-        "gci",
-        "gocheckcompilerdirectives",
-        "gocognit",
-        "gocyclo",
-        "godox",
-        "goerr113",
-        "gomnd",
-        "gomodguard",
-        "goprintffuncname",
-        "grouper",
-        "importas",
-        "interfacebloat",
-        "ireturn",
-        "lll",
-        "loggercheck",
-        "maintidx",
-        "makezero",
-        "musttag",
-        "nestif",
-        "nonamedreturns",
-        "nosprintfhostport",
-        "paralleltest",
-        "testpackage",
-        "typecheck",
-        "varnamelen",
-        "whitespace",
-        "wrapcheck",
-        "wsl"
+[formatters]
+enable = [
+  'gci',
+  'gofumpt',
+  'goimports'
+]
+
+[formatters.exclusions]
+generated = 'lax'
+paths = [
+  'frontend',
+  'third_party$',
+  'builtin$',
+  'examples$'
 ]