blob: 6222cabc25d4402e517c3a1b7b93072dcc6f1a9c (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
|
# SPDX-FileCopyrightText: 2026 Stefan Majewsky <majewsky@gmx.net>
# SPDX-License-Identifier: Apache-2.0
version: "2"
run:
modules-download-mode: vendor
timeout: 3m0s # none by default in v2
formatters:
enable:
- gofmt
- goimports
issues:
max-issues-per-linter: 0 # no limit
max-same-issues: 0 # no limit
linters:
default: standard
enable:
- errorlint
- exhaustive
- gocheckcompilerdirectives
- goconst
- gocritic
- gosec
- intrange
- misspell
- musttag
- nilerr
- nolintlint
- perfsprint
- prealloc
- predeclared
- reassign
- unconvert
- usestdlibvars
- usetesting
- wastedassign
- whitespace
settings:
goconst:
min-occurrences: 5
gocritic:
disable-all: true
enabled-checks:
- boolExprSimplify
- builtinShadow
- emptyStringTest
- evalOrder
- httpNoBody
- importShadow
- initClause
- methodExprCall
- paramTypeCombine
- preferFilepathJoin
- ptrToRefParam
- redundantSprint
- returnAfterHttpError
- stringConcatSimplify
- timeExprSimplify
- truncateCmp
- typeAssertChain
- typeUnparen
- unnamedResult
- unnecessaryBlock
- unnecessaryDefer
- weakCond
- yodaStyleExpr
gomoddirectives:
toolchain-forbidden: true
go-version-pattern: 1\.\d+(\.0)?$
nolintlint:
require-specific: true
staticcheck:
dot-import-whitelist:
- github.com/majewsky/gg/option
exclusions:
generated: lax
presets:
- comments
- common-false-positives
- legacy
- std-error-handling
rules:
- path: (.+)\.go$
text: declaration of "err" shadows declaration at
- path: _test\.go
linters: [ goconst ]
|