-
Notifications
You must be signed in to change notification settings - Fork 911
Expand file tree
/
Copy path.golangci.yaml
More file actions
148 lines (147 loc) · 4.37 KB
/
.golangci.yaml
File metadata and controls
148 lines (147 loc) · 4.37 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
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
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
# output configuration options
version: "2"
# All available settings of specific linters.
# Refer to https://golangci-lint.run/usage/linters
linters:
default: standard
enable:
- revive
- godoclint
- funlen
- cyclop
disable:
- errcheck
- staticcheck
- unused
- ineffassign
exclusions:
generated: lax
paths:
- ".*_test.go"
- ".*_mock.go"
rules:
- path: "^internal/.*"
linters:
- revive
- text: "var-naming: don't use underscores in Go names"
linters:
- revive
- path: "/utils/"
text: "var-naming: avoid meaningless package names"
linters:
- revive
- text: "exported: type name will be used as agent.AgentOption by other packages"
linters:
- revive
- path: "adk/prebuilt/deep/task_tool.go"
text: "argument-limit: maximum number of arguments per function exceeded"
linters:
- revive
- path: "compose/component_to_graph_node.go"
text: "argument-limit: maximum number of arguments per function exceeded"
linters:
- revive
- path: "compose/graph_run.go"
text: "argument-limit: maximum number of arguments per function exceeded"
linters:
- revive
- path: "adk/workflow.go"
text: "argument-limit: maximum number of arguments per function exceeded"
linters:
- revive
- path: "compose/graph.go"
linters:
- cyclop
text: "calculated cyclomatic complexity for function compile"
- path: "schema/message.go"
linters:
- cyclop
text: "calculated cyclomatic complexity for function ConcatMessages"
- path: "compose/graph_run.go"
linters:
- cyclop
text: "calculated cyclomatic complexity for function run"
- path: "compose/graph.go"
linters:
- funlen
text: "Function 'compile' is too long"
- path: "compose/graph_run.go"
linters:
- funlen
text: "Function 'run' is too long"
settings:
govet:
enable-all: true
# Disable analyzers by name.
# Run `go tool vet help` to see all analyzers.
disable:
- fieldalignment
revive:
# Sets the default failure confidence.
# This means that linting errors with less than 0.8 confidence will be ignored.
# Default: 0.8
confidence: 0.8
rules:
# Exported function and methods should have comments.
- name: exported
severity: error
exclude:
- "^internal/.*"
arguments:
- "disable-checks-on-constants"
- "disable-checks-on-variables"
- "disable-checks-on-types"
- "disable-checks-on-methods"
- name: package-comments
disabled: false
- name: var-naming
disabled: false
arguments:
# AllowList
- [ "utils", "s_", "err_", "err__", "plan_", "userInput_", "executedSteps_", "executedStep_", "iterator_", "in_", "out_" ]
# DenyList
- [ ]
- - extra-bad-package-names:
- helpers
- models
- name: argument-limit
arguments: [ 6 ]
- name: function-length
arguments: [ 120, 0 ]
godoclint:
check-exported: true
require-package-documentation: true
funlen:
lines: 200
statements: 120
cyclop:
max-complexity: 40
package-average: 20
formatters:
enable:
- gci
- gofmt
settings:
gofmt:
# Simplify code: gofmt with `-s` option.
# Default: true
simplify: true
# Apply the rewrite rules to the source before reformatting.
# https://pkg.go.dev/cmd/gofmt
# Default: []
rewrite-rules:
- pattern: 'interface{}'
replacement: 'any'
- pattern: 'a[b:len(a)]'
replacement: 'a[b:]'
gci:
# Section configuration to compare against.
# Section names are case-insensitive and may contain parameters in ().
# The default order of sections is `standard > default > custom > blank > dot > alias > localmodule`.
# If `custom-order` is `true`, it follows the order of `sections` option.
# Default: ["standard", "default"]
sections:
- standard
- default
- localmodule
custom-order: true