.golangci.toml

  1# SPDX-FileCopyrightText: Amolith <amolith@secluded.site>
  2#
  3# SPDX-License-Identifier: CC0-1.0
  4
  5version = '2'
  6
  7[run]
  8concurrency = 8
  9go = ''
 10modules-download-mode = 'readonly'
 11issues-exit-code = 1
 12tests = true
 13
 14[output]
 15path-prefix = ''
 16
 17[linters]
 18enable = [
 19  'asasalint',
 20  'asciicheck',
 21  'bidichk',
 22  'bodyclose',
 23  'containedctx',
 24  'contextcheck',
 25  'cyclop',
 26  'decorder',
 27  'dogsled',
 28  'dupl',
 29  'dupword',
 30  'durationcheck',
 31  'err113',
 32  'errchkjson',
 33  'errname',
 34  'errorlint',
 35  'exhaustive',
 36  'exhaustruct',
 37  'forcetypeassert',
 38  'funlen',
 39  'gocheckcompilerdirectives',
 40  'gocognit',
 41  'gocritic',
 42  'gocyclo',
 43  'godot',
 44  'godox',
 45  'gomoddirectives',
 46  'gomodguard',
 47  'goprintffuncname',
 48  'gosec',
 49  'grouper',
 50  'importas',
 51  'interfacebloat',
 52  'ireturn',
 53  'lll',
 54  'loggercheck',
 55  'maintidx',
 56  'makezero',
 57  'misspell',
 58  'mnd',
 59  'musttag',
 60  'nakedret',
 61  'nestif',
 62  'nilerr',
 63  'nilnil',
 64  'noctx',
 65  'nolintlint',
 66  'nonamedreturns',
 67  'nosprintfhostport',
 68  'paralleltest',
 69  'prealloc',
 70  'predeclared',
 71  'promlinter',
 72  'reassign',
 73  'revive',
 74  'rowserrcheck',
 75  'sqlclosecheck',
 76  'staticcheck',
 77  'tagliatelle',
 78  'testableexamples',
 79  'testpackage',
 80  'thelper',
 81  'tparallel',
 82  'unconvert',
 83  'unparam',
 84  'usestdlibvars',
 85  'varnamelen',
 86  'wastedassign',
 87  'whitespace',
 88  'wrapcheck',
 89  'wsl_v5'
 90]
 91
 92[linters.settings]
 93  [linters.settings.wsl_v5]
 94    allow-first-in-block = true
 95    allow-whole-block = false
 96    branch-max-lines = 2
 97
 98[linters.exclusions]
 99generated = 'lax'
100presets = [
101  'comments',
102  'common-false-positives',
103  'legacy',
104  'std-error-handling'
105]
106paths = [
107  'frontend',
108  'third_party$',
109  'builtin$',
110  'examples$'
111]
112
113[issues]
114max-issues-per-linter = 0
115max-same-issues = 0
116new = false
117fix = false
118
119[formatters]
120enable = [
121  'gci',
122  'gofumpt',
123  'goimports'
124]
125
126[formatters.exclusions]
127generated = 'lax'
128paths = [
129  'frontend',
130  'third_party$',
131  'builtin$',
132  'examples$'
133]