-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy path.golangci.yml
76 lines (73 loc) · 2.5 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
linters:
enable-all: true
disable:
- gofumpt # Only formatting
- godot # Only formatting
- varnamelen # Imho not important
- wrapcheck # This project does not use error wrapping
- paralleltest # This project is not using parallel testing
- nlreturn # Only formatting
- ireturn # This project sometimes uses interfaces
- gomnd # This project has some hardcoded numbers for times and delays
- err113 # Do not agree
- gochecknoglobals # This project still uses some global variables
- exhaustruct # This projects relies on using only parts of structs
- errorlint # This project has not yet moved to static errors
- wsl # Formatting
- misspell # My english is just not that good
- lll # Formatting
- tagliatelle # Formatting
- gochecknoinits # issue 84
- gocritic # Formatting
- godox # Formatting
- durationcheck # Using duration multiplication a few times
- gci # Formatting
- nonamedreturns # Do not agree with this linter
- stylecheck # Formatting
- testpackage # Naming
- exhaustive # To many false positives
- interfacebloat # Do not agree
- mnd # Do not agree
# deprecated
- rowserrcheck
- sqlclosecheck
- wastedassign
- inamedparam
- execinquery
linters-settings:
cyclop:
max-complexity: 30
funlen:
lines: 150
statements: 80
gocognit:
min-complexity: 40 # not ideal, should be improved
depguard:
rules:
main:
deny:
- pkg: github.com/tj/assert
desc: github.com/stretchr/testify/assert is preferred
issues:
exclude-rules:
- path: '(.*)_test\.go'
linters:
- funlen
- forcetypeassert
- goconst
- noctx
- forbidigo
- path: internal/connectors/matrix/tests
linters:
- forbidigo
- path: '(.*)\/string\.go'
text: "G404: Use of weak random number generator" # Used as fallback
- path: '(.*)\/motivational_sentence\.go'
text: "G404: Use of weak random number generator" # Not important
- path: '(.*)\/initializers\.go'
text: "SA4009: argument db is overwritten before first use" # Preparation for later usage
- path: '(.*).go'
text: 'G115: integer overflow conversion' # Conversions from database (int) to business model (uint)
exclude:
- 'string `11:45 12\.11\.2014 \(UTC\)` has 3 occurrences, make it a constant' # Used for test validation
- '`\(\*Syncer\)\.sendAndStoreReply` - `reminderID` always receives `0' # Param might be useful later