# SPDX-FileCopyrightText: Amolith <amolith@secluded.site>
#
# SPDX-License-Identifier: CC0-1.0

version = '2'

[run]
concurrency = 8
go = ''
modules-download-mode = 'readonly'
issues-exit-code = 1
tests = true

[output]
path-prefix = ''

[linters]
enable = [
  'asasalint',
  'asciicheck',
  'bidichk',
  'bodyclose',
  'containedctx',
  'contextcheck',
  'cyclop',
  'decorder',
  '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

[formatters]
enable = [
  'gci',
  'gofumpt',
  'goimports'
]

[formatters.exclusions]
generated = 'lax'
paths = [
  'frontend',
  'third_party$',
  'builtin$',
  'examples$'
]
