-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.golangci.yaml
95 lines (92 loc) · 2.51 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
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
# https://golangci-lint.run/usage/linters/
linters:
enable-all: true
disable:
- exportloopref
- godot # adds period at end of comments (no thanks)
- godox # bans TODO
- exhaustruct
- depguard
- nlreturn
- gomoddirectives
- wsl # only one cuddle assignment allowed before range statement
- wrapcheck
- nonamedreturns # i like these sometimes
- paralleltest
- varnamelen
- ireturn # not allowed to return interfaces
- tagliatelle # json(camel): got 'feed_id' want 'feedId'
- gochecknoglobals
- interfacebloat
- perfsprint
- nilnil
- stylecheck # feedId -> feedID
- thelper
- intrange # for x := 0; x < count; x++ -> for x := range make([]int, count)
- lll
linters-settings:
tagalign:
align: true
sort: false
strict: false
# https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md
revive:
enable-all-rules: true
rules:
- name: add-constant
disabled: true
- name: flag-parameter
exclude:
- "rpc/pkg/client/client.go"
- name: import-shadowing
disabled: true
- name: import-alias-naming
disabled: true
- name: line-length-limit
disabled: true
- name: unchecked-type-assertion
exclude:
- '_test\\.go$'
- name: unused-receiver
exclude:
- graph/extensions/prometheus/prometheus.go
- name: max-public-structs
disabled: true
- name: comment-spacings
disabled: true
# - name: var-naming
# severity: warning
# disabled: false
# exclude:
# - \\root\\.go$
# arguments:
# - ["ID", "RPC", "URL", "GUID", "HTML"] # AllowList
# - ["VM"] # DenyList
# - - upperCaseConst: true # Extra parameter (upperCaseConst|skipPackageNameChecks)
# TODO: temporary disabled
- name: var-naming
disabled: true
- name: flag-parameter
disabled: true
- name: cognitive-complexity
disabled: true
# https://golangci-lint.run/usage/configuration/#issues-configuration
issues:
exclude-rules:
- path: api/
linters:
- depguard
- revive
- path: cli/
linters:
- revive
- path: services/graph/graph/schema.resolvers_test.go
linters:
- revive
exclude-files:
- ".*\\.pb\\.go$"
- pkg/feeds/v1/service_grpc.pb.go
- services/graph/extensions/prometheus/prometheus.go
- internal/goverter/goverter.go
whole-files: true
fix: true