-
Notifications
You must be signed in to change notification settings - Fork 0
/
.golangci.yml
73 lines (70 loc) · 2.74 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
run:
timeout: 10m
issues:
max-issues-per-linter: 0
max-same-issues: 0
# disable some excludes that golangci-lint has by default. see https://github.com/golangci/golangci-lint
exclude-use-default: false
exclude-rules:
# This project does not have a rule to avoid unkeyed fields
- linters:
- govet
text: composite literal uses unkeyed fields
# Disable duplicate code, constant strings, unused params validation in testing
- path: _test\.go$
linters:
- goconst
- unparam
# These checks are not really useful
- linters:
- errcheck
text: "Error return value of `.*(Close|Remove)` is not checked"
# This project does not have a rule to have a doc comment for all packages
- linters:
- stylecheck
text: "at least one file in a package should have a package comment"
linters:
enable-all: true
disable:
- gochecknoglobals # this project does not have a rule to have no globals
- gochecknoinits # this project does not have a rule to have no inits
- lll # this project does not have a maximum line length
- maligned # this project does not care about optimizing out last few bytes of memory
- godox # this project explicitly allows FIXMEs in the code
- funlen # this project does not have a maximum function length
- nestif # this project only hires people who can handle nested control structures
- testpackage # this project does not require separate test packages
- gofumpt # this project does not have a rule to format everything using gofumpt
# The following checks are disabled due to false positives:
- gocyclo
- bodyclose
- interfacer
- gomnd # this check has good intentions but the implementation is not good
- dupl # this check finds duplicate code where it is plain old Go repetiveness
- gocognit # this check is too simplistic, marks even simple functions as "cognitively complex"
# The following checks are disabled due to a very low quality - they make suggestions that make code worse:
- gosec
- goerr113 # fmt.Errorf() prohibition is cruel.
# The following checks are disabled due to their all'round silliness:
- wsl
- godot
# These checks are absorbed into staticcheck
- gosimple
- megacheck
- unused
# Temporarily disabled until all existing problems are fixed
- exhaustive
- noctx
- nlreturn
- wrapcheck
- paralleltest
- thelper
- predeclared
- exhaustivestruct
- errorlint
- gci
- forbidigo
linters-settings:
nakedret:
# make an issue if func has more lines of code than this setting and it has naked returns; default is 30
max-func-lines: 1