-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.golangci.yaml
49 lines (45 loc) · 1.45 KB
/
.golangci.yaml
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
# This is for the IDE. We need to duplicate it because the --fast flag doesn’t filter manually enabled linters:
# https://github.com/golangci/golangci-lint/issues/1909.
# The idea was then to duplicate it, rename to -ide.yaml and reference this file in settings.json. That way, default
# manualy golangci-lint run would run all linters as CI. IDE will only run our fast list.
# However, we can’t use variables like ${workspaceRoot} in settings.json. https://github.com/microsoft/vscode/issues/2809.
# Please keep the list in sync.
linters:
fast: true
# linters to run in addition to default ones
enable:
- dupl
#- durationcheck
#- errname
#- errorlint
#- exportloopref
- forbidigo
- forcetypeassert
- gci
- godot
- gofmt
#- gosec
- misspell
- revive
#- thelper
#- tparallel
#- unconvert
#- unparam
#- wastedassign
#- whitespace
##- wrapcheck # To think properly about it
# Get all linter issues, even if duplicated
issues:
exclude-use-default: false
max-issues-per-linter: 0
max-same-issues: 0
exclude:
# EXC0001 errcheck: most errors are in defer calls, which are safe to ignore and idiomatic Go (would be good to only ignore defer ones though)
- 'Error return value of .*Close` is not checked'
fix: true # we want this in IDE.
linters-settings:
# Forbid the usage of deprecated ioutil and debug prints
forbidigo:
forbid:
- ioutil\.
- ^print(f|ln)?\($