-
Notifications
You must be signed in to change notification settings - Fork 413
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Exclude specific subfolder from --all #395
Comments
Hi, I agree on the need for this. |
This comment was marked as spam.
This comment was marked as spam.
2 similar comments
This comment was marked as spam.
This comment was marked as spam.
This comment was marked as spam.
This comment was marked as spam.
I'd also find this feature useful. Taking a look at the code it looks like the behaviour change would be within Line 65 in 8174e46
I'd have a stab at a PR on this (although whether the v3 overhaul might make this undesired is to be seen), but an open question is - should the exclude be just for top level directories or any subdirectory matching a given pattern (and if the latter, how to make sure |
Thanks for the engagement everyone. Two quick thoughts I have, please refrain from commenting
I think 2 is a bit more portable and easier to code for. Which of these would people prefer? Or maybe there is a secret third option I'm missing. |
I'd vote for option 2, I hadn't even thought of that alternative! Imagining code to support this would be simpler which is a big plus. Although config might be more intuitive, the exact way in which the subpaths have to be specified would require reading docs more carefully, whereas the |
PR opened for implementing |
In my mocks generator it is possible to exclude specific subfolder) https://github.com/subtle-byte/mockigo |
Option 1: Option 2:
I see that there is already a PR for this #458. Option 3: P.S.: "Add ability to skip vendor folder when using --all flag": #377 |
is there any update on this topic? |
Probably skipping vendor should be as default behavior |
I feel like the Why not just have a Considering it's not a huge sausage shell command that you have to write out with all the parameters, it's nice and easy to understand and maintain. There's no need to reinvent the wheel, that's how every other tool deals with files does, so it's intuitive for people as well. |
As for anyone that got to this thread, and has the same problem, I managed to solve it by removing the
You can also use
|
Circling back on this, I am in favor of adding a configuration parameter to exclude directories. Please do submit a PR, if it's good then we can get it merged! |
Hey @LandonTClipp, |
Mostly a followup to #255, with the introduction of go modules, dependencies are in the
vendor
subfolder.With the command
mockery --all
, mocks will be generated for all interfaces of third party dependencies.It would be great to have some way of excluding this folders (and potentially other ones).
Is there a way to do this already?
The text was updated successfully, but these errors were encountered: