You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/faq.md
+23Lines changed: 23 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -5,6 +5,29 @@ title: FAQ
5
5
Frequently Asked Questions
6
6
===========================
7
7
8
+
error: `interface not found in source`
9
+
--------------------------------------
10
+
11
+
!!! tip "v3.6.0"
12
+
13
+
Version [`v3.6.0`](https://github.com/vektra/mockery/releases/tag/v3.6.0) of mockery fixed a bug in how files were detected to be auto-generated. Many users may find that mockery is suddenly unable to find mocks after upgrading to `v3.6.0`. Try providing:
14
+
15
+
```yaml title=""
16
+
include-auto-generated: true
17
+
```
18
+
19
+
in your mockery config to see if this resolves the issue.
20
+
21
+
This log message indicates that an interface was explicitly listed in the mockery config but it was not found in the source. This can happen for a number of reasons:
22
+
23
+
1. The package name was misspelled
24
+
2. The interface name was misspelled
25
+
3. The `#!yaml include-auto-generated: false` parameter was set (of which `false` is the default) and the interface lived in an auto-generated file.
26
+
27
+
Setting `#!yaml log-level: debug` can provide a lot of insight into mockery's decision tree, so we recommend inspecting these logs for further clues into why the interface was not found.
28
+
29
+
For more details on `include-auto-generated`, visit [the related documentation](include-auto-generated.md).
Copy file name to clipboardExpand all lines: docs/generate-directive.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,4 +1,4 @@
1
-
## Description
1
+
:octicons-tag-24: v3.6.0
2
2
3
3
An alternative way to configure mocks is to use the `#!go //mockery:generate` directive. Mockery parses the doc comments and allows you to override configuration of specific interfaces in the source code. For example:
0 commit comments