-
Notifications
You must be signed in to change notification settings - Fork 415
/
.mockery.yaml
111 lines (110 loc) · 3.62 KB
/
.mockery.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
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
quiet: False
disable-version-string: True
with-expecter: True
mockname: "{{.InterfaceName}}"
filename: "{{.MockName}}_mock.go"
outpkg: mocks
tags: "custom2"
issue-845-fix: True
resolve-type-alias: False
_anchors: &inpackage_config
all: True
dir: "{{.InterfaceDir}}"
mockname: "Mock{{.InterfaceName}}"
outpkg: "{{.PackageName}}_test"
filename: "mock_{{.InterfaceNameSnake}}_test.go"
inpackage: False
packages:
github.com/vektra/mockery/v2/pkg/fixtures/buildtag/comment:
config:
mock-build-tags: "custom3 && (!windows || !darwin || !freebsd)"
disable-version-string: true
interfaces:
IfaceWithCustomBuildTagInComment:
github.com/vektra/mockery/v2/pkg:
interfaces:
TypesPackage:
github.com/vektra/mockery/v2/pkg/fixtures:
config:
all: True
interfaces:
RequesterArgSameAsNamedImport:
RequesterVariadic:
config:
with-expecter: False
configs:
- mockname: RequesterVariadicOneArgument
unroll-variadic: False
- mockname: RequesterVariadic
unroll-variadic: True
Expecter:
config:
with-expecter: True
configs:
- mockname: ExpecterAndRolledVariadic
unroll-variadic: False
- mockname: Expecter
unroll-variadic: True
RequesterReturnElided:
VariadicNoReturnInterface:
config:
with-expecter: True
unroll-variadic: False
# Replace generic params with a new constraint and a new fixed value
ReplaceGeneric:
config:
replace-type:
- github.com/vektra/mockery/v2/pkg/fixtures.ReplaceGeneric[-TImport]=github.com/vektra/mockery/v2/pkg/fixtures/redefined_type_b.B
- github.com/vektra/mockery/v2/pkg/fixtures.ReplaceGeneric[TConstraint]=github.com/vektra/mockery/v2/pkg/fixtures/constraints.String
# Replace a generic param with the parent type
ReplaceGenericSelf:
config:
replace-type:
- github.com/vektra/mockery/v2/pkg/fixtures.ReplaceGenericSelf[-T]=github.com/vektra/mockery/v2/pkg/fixtures.*ReplaceGenericSelf
github.com/vektra/mockery/v2/pkg/fixtures/recursive_generation:
config:
recursive: True
all: True
dir: "{{.InterfaceDir}}"
filename: "{{.InterfaceName}}_mock.go"
mockname: "Mock{{.InterfaceName}}"
outpkg: "{{.PackageName}}"
inpackage: True
github.com/vektra/mockery/v2/pkg/fixtures/method_args/same_name_arg_and_type:
config:
all: True
dir: "{{.InterfaceDir}}"
mockname: "{{.InterfaceName}}Mock"
outpkg: "{{.PackageName}}"
filename: "mock_{{.InterfaceName}}_test.go"
inpackage: True
keeptree: False
github.com/vektra/mockery/v2/pkg/fixtures/iface_typed_param:
config: *inpackage_config
github.com/vektra/mockery/v2/pkg/fixtures/example_project:
config: *inpackage_config
github.com/vektra/mockery/v2/pkg/fixtures/issue845:
config:
<<: *inpackage_config
filename: "mock_{{.MockName}}_test.go"
interfaces:
Interface:
configs:
- issue-845-fix: False
mockname: WithoutFix
- issue-845-fix: True
mockname: WithFix
github.com/vektra/mockery/v2/pkg/fixtures/type_alias:
config:
all: True
dir: "{{.InterfaceDir}}"
filename: "mock_{{.MockName}}_test.go"
outpkg: "{{.PackageName}}_test"
inpackage: False
interfaces:
Interface1:
configs:
- resolve-type-alias: False
mockname: InterfaceWithUnresolvedAlias
- resolve-type-alias: True
mockname: InterfaceWithResolvedAlias