-
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.golangci.yaml
More file actions
73 lines (71 loc) · 1.94 KB
/
.golangci.yaml
File metadata and controls
73 lines (71 loc) · 1.94 KB
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
version: "2"
linters:
# Enable specific linter
# https://golangci-lint.run/usage/linters/#enabled-by-default
enable:
- errcheck
- ineffassign
- staticcheck
- unused
# Disable specific linter
# https://golangci-lint.run/usage/linters/#disabled-by-default
disable:
# Enable presets.
# https://golangci-lint.run/usage/linters
# Default: []
- govet
- godot
- wsl
- testpackage
- whitespace
- tagalign
- nosprintfhostport
- nlreturn
- nestif
- mnd
- misspell
- lll
- godox
- funlen
- gochecknoinits
- depguard
- goconst
- dupword
- cyclop
- gocognit
- maintidx
- gocyclo
- dupl
settings:
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: false
# report about assignment of errors to blank identifier: `num, _ := strconv.Atoi(numStr)`.
# Such cases aren't reported by default.
# Default: false
check-blank: false
# To disable the errcheck built-in exclude list.
# See `-excludeonly` option in https://github.com/kisielk/errcheck#excluding-functions for details.
# Default: false
disable-default-exclusions: true
# List of functions to exclude from checking, where each entry is a single function to exclude.
# See https://github.com/kisielk/errcheck#excluding-functions for details.
exclude-functions:
- (*os.File).Close
- (io.Closer).Close
- io/ioutil.ReadFile
- io.Copy(*bytes.Buffer)
- io.Copy(os.Stdout)
- (io.Writer).Write
- (*bufio.Writer).Write
- (*encoding/json.Encoder).Encode
- os.Setenv
- os.Unsetenv
- fmt.Printf
- fmt.Print
- fmt.Println
- fmt.Fprint
- fmt.Fprintf
- (*strings.Builder).WriteString