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
I am placing a .mockery.yaml file into the sub-packages directory to control how that package generates mocks. It would be great if I could omit the packages and have mockery execute on the package within the same directory or if instead the package names could be templated. Something like the following would be nice:
With that I could define a single configuration and run mockery within different packages to generate the mocks for that package.
I am trying to avoid having a single .mockery.yaml file for the entire repo as different parts of the repo are owned by different teams in my organization.
go list . will output the current directories corresponding Go package so I assume it should be relatively simple to get it programmatically as well.
Mockery Version
2.37.1
Golang Version
1.21
Installation Method
Binary Distribution
Docker
brew
go install
Other: [specify]
Steps to Reproduce
N/A
Expected Behavior
N/A
Actual Behavior
N/A
The text was updated successfully, but these errors were encountered:
In theory, this could be done by the Config object looking for go.mod in the working directory and inferring from that. I want to make mockery more friendly to monorepo-style repos, but for now I don't see this particular feature as something that would dramatically improve quality of life.
I can leave it up for consideration. For the audience, vote up on it if you want this feature.
Description
I have a mockery config like:
I am placing a .mockery.yaml file into the sub-packages directory to control how that package generates mocks. It would be great if I could omit the packages and have
mockery
execute on the package within the same directory or if instead the package names could be templated. Something like the following would be nice:With that I could define a single configuration and run mockery within different packages to generate the mocks for that package.
I am trying to avoid having a single .mockery.yaml file for the entire repo as different parts of the repo are owned by different teams in my organization.
go list .
will output the current directories corresponding Go package so I assume it should be relatively simple to get it programmatically as well.Mockery Version
2.37.1
Golang Version
1.21
Installation Method
Steps to Reproduce
N/A
Expected Behavior
N/A
Actual Behavior
N/A
The text was updated successfully, but these errors were encountered: