.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  'depguard',
 28  'dogsled',
 29  'dupl',
 30  'dupword',
 31  'durationcheck',
 32  'err113',
 33  'errchkjson',
 34  'errname',
 35  'errorlint',
 36  'exhaustive',
 37  'exhaustruct',
 38  'forcetypeassert',
 39  'funlen',
 40  'gocheckcompilerdirectives',
 41  'gocognit',
 42  'gocritic',
 43  'gocyclo',
 44  'godot',
 45  'godox',
 46  'gomoddirectives',
 47  'gomodguard',
 48  'goprintffuncname',
 49  'gosec',
 50  'grouper',
 51  'importas',
 52  'interfacebloat',
 53  'ireturn',
 54  'lll',
 55  'loggercheck',
 56  'maintidx',
 57  'makezero',
 58  'misspell',
 59  'mnd',
 60  'musttag',
 61  'nakedret',
 62  'nestif',
 63  'nilerr',
 64  'nilnil',
 65  'noctx',
 66  'nolintlint',
 67  'nonamedreturns',
 68  'nosprintfhostport',
 69  'paralleltest',
 70  'prealloc',
 71  'predeclared',
 72  'promlinter',
 73  'reassign',
 74  'revive',
 75  'rowserrcheck',
 76  'sqlclosecheck',
 77  'staticcheck',
 78  'tagliatelle',
 79  'testableexamples',
 80  'testpackage',
 81  'thelper',
 82  'tparallel',
 83  'unconvert',
 84  'unparam',
 85  'usestdlibvars',
 86  'varnamelen',
 87  'wastedassign',
 88  'whitespace',
 89  'wrapcheck',
 90  'wsl_v5'
 91]
 92
 93[linters.settings]
 94  [linters.settings.wsl_v5]
 95    allow-first-in-block = true
 96    allow-whole-block = false
 97    branch-max-lines = 2
 98
 99[linters.exclusions]
100generated = 'lax'
101presets = [
102  'comments',
103  'common-false-positives',
104  'legacy',
105  'std-error-handling'
106]
107paths = [
108  'frontend',
109  'third_party$',
110  'builtin$',
111  'examples$'
112]
113
114[issues]
115max-issues-per-linter = 0
116max-same-issues = 0
117new = false
118fix = false
119
120[formatters]
121enable = [
122  'gci',
123  'gofumpt',
124  'goimports'
125]
126
127[formatters.exclusions]
128generated = 'lax'
129paths = [
130  'frontend',
131  'third_party$',
132  'builtin$',
133  'examples$'
134]