forked from okteto/okteto
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.golangci.yml
111 lines (104 loc) · 2.69 KB
/
.golangci.yml
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
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
run:
modules-download-mode: readonly
output:
print-issued-lines: false
sort-results: true
linters-settings:
unparam:
# Inspect exported functions.
#
# Set to true if no external program/library imports your code.
# XXX: if you enable this setting, unparam will report a lot of false-positives in text editors:
# if it's called for subdir of a project it can't find external interfaces. All text editor integrations
# with golangci-lint call it on a directory with the changed file.
#
check-exported: true
errcheck:
# Report about not checking of errors in type assertions: `a := b.(MyStruct)`.
# Such cases aren't reported by default.
# Default: false
check-type-assertions: true
# report about assignment of errors to blank identifier: `num, _ := strconv.Atoi(numStr)`.
# Such cases aren't reported by default.
# Default: false
check-blank: true
tenv:
# The option `all` will run against whole test files (`_test.go`) regardless of method/function signatures.
# Otherwise, only methods that take `*testing.T`, `*testing.B`, and `testing.TB` as arguments are checked.
# Default: false
all: true
govet:
enable:
- fieldalignment
goheader:
values:
regexp:
YEAR: 2023|2024
template-path: .copyright-header.tmpl
mnd:
checks:
- argument
- case
- condition
# - operation
# - return
# - assign
ignored-functions:
- '\.NewWriter'
- '\.NewTabWriter'
- '\.WriteFile'
- '^time.'
- '^os.'
- '^bcrypt.'
- '^math.'
- '^big.'
- '\.SetIndent'
- int
- make
- '\.WithTimeout'
revive:
rules:
- name: exported
# All possible linters can be found https://golangci-lint.run/usage/linters/
linters:
enable:
- errcheck
- gosimple
- typecheck
- govet
- ineffassign
- unused
- unparam
- tenv
- tparallel
- gci
- goheader
- unconvert
- predeclared
- asciicheck
- asasalint
- bidichk
- decorder
- exportloopref
- makezero
- mnd
- musttag
- bodyclose
- durationcheck
- exhaustive
- revive
issues:
include:
- EXC0014 # EXC0014 revive: comment on exported (.+) should be of the form "(.+)..."
# Maximum issues count per one linter. Set to 0 to disable. Default is 50.
max-issues-per-linter: 0
# Maximum count of issues with the same text. Set to 0 to disable. Default is 3.
max-same-issues: 0
exclude-rules:
- path: '(.+)_test\.go'
linters:
- errcheck
- linters:
- unparam
# exclude from linting the custom implementation for "MarshalYAML"
text: 'MarshalYAML()'