From 0c5b6a44a9e21c3dc9f2401f2a39726693abd36b Mon Sep 17 00:00:00 2001 From: LandonTClipp Date: Tue, 14 Nov 2023 09:47:23 -0600 Subject: [PATCH] add note in docs about go.mod skipping --- docs/features.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/docs/features.md b/docs/features.md index 979b03b6..9d320f98 100644 --- a/docs/features.md +++ b/docs/features.md @@ -178,6 +178,8 @@ packages: You can use the `showconfig` command to see the config mockery injects. The output of `showconfig` theoretically could be copy-pasted into your yaml file as it is semantically equivalent. +mockery will _not_ recurse into submodules, i.e. any subdirectory that contains a go.mod file. You must specify the submodule as a separate line item in the config if you would like mocks generated for it as well. + ??? note "performance characteristics" The performance when using `#!yaml recursive: true` may be worse than manually specifying all packages statically in the yaml file. This is because of the fact that mockery has to recursively walk the filesystem path that contains the package in question. It may unnecessarily walk down unrelated paths (for example, a Python virtual environment that is in the same path as your package). For this reason, it is recommended _not_ to use `#!yaml recursive: true` if it can be avoided.