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
Mockery also generates mocks for interfaces inside mock*.go #471
Comments
I think this is a regression after we introduced |
What I did temporarily is removing all the mock files first, then generating mocks again (I did it with Makefile). Can we use that approach for this case? |
I don't think mockery should be removing files. Actually, one workaround that might work (if/when we merge the PR) is to place a |
I see. So currently the finest solution could be igoring files that begin with |
Correct I think so. That would break if people find a way to remove the preamble but I can't think of another reliable solution at the moment. We could key off of the file's name to determine whether it's a mock file or not, but the way people name their mock files could change... and it just seems kind of fragile. |
Can be removed once vektra/mockery#471 is fixed
This has been fixed in the most recent version. #472 |
Sorry for the late response. I agree that the solution is a bit tricky, haha. I already tried your solution before and realized that we couldn't just check the file header since |
Description
--inpackage
flag,mock
files also contain an inteface, sth like this:Version
v2.12.3
Steps to Reproduce
--inpackage
flagExpected Behavior
Actual Behavior
The text was updated successfully, but these errors were encountered: