This repository has been archived by the owner on Aug 16, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 40
/
.golangci.yml
126 lines (122 loc) · 2.61 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
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
# DONT EDIT. This file is synced from https://github.com/cloudquery/.github/.github
run:
tests: true
skip-dirs:
- bin
- docs
- client/mocks
- resources/forks
timeout: 3m
build-tags:
- all
linters-settings:
errcheck:
check-blank: false
ignore: fmt:.*,[rR]ead|[wW]rite|[cC]lose,io:Copy
gocritic:
disabled-checks:
- commentFormatting
dupl:
# tokens count to trigger issue, 150 by default
threshold: 500
decorder:
dec-order:
- type
- const
- var
- func
disable-dec-order-check: false
wrapcheck:
ignoreSigs:
- diag.WrapError
revive:
enable-all-rules: true
rules:
- name: cyclomatic
disabled: true
- name: argument-limit
disabled: true
- name: function-length
disabled: true
- name: function-result-limit
disabled: true
- name: line-length-limit
disabled: true
- name: file-header
disabled: true
- name: cognitive-complexity
disabled: true
- name: banned-characters
disabled: true
- name: max-public-structs
disabled: true
- name: add-constant
disabled: true
- name: unhandled-error
disabled: true
- name: var-naming
disabled: true
- name: deep-exit
disabled: true
- name: exported
disabled: false
arguments:
- 'disableStutteringCheck'
- name: unused-parameter
disabled: true
- name: confusing-naming
disabled: true
- name: confusing-results
disabled: true
- name: flag-parameter
disabled: true
- name: nested-structs
disabled: true
linters:
enable:
- asciicheck
- bodyclose
- deadcode
- decorder
- depguard
- dupl
- errcheck
- gci
- gocritic
- gofmt
- gosimple
- govet
- ineffassign
- importas
- misspell
- nakedret
- prealloc
- revive
- staticcheck
- structcheck
- unconvert
- unparam
- unused
- varcheck
- wrapcheck
issues:
exclude-rules:
# Exclude some linters from running on tests files.
- path: _test\.go
linters:
- dupl
- gocritic
- wrapcheck
# Exclude some linters from running on resource files.
- path: resources(\\|\/).*\.go
linters:
- dupl
- decorder
# Exclude some linters from running on services files.
- path: services\.go
linters:
- dupl
# Run wrapcheck only on resources files.
- path: '(client|test|tools)(\\|\/).*\.go'
linters:
- wrapcheck