Skip to content
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

Ability to only mock current directory #906

Open
jackstine opened this issue Jan 31, 2025 · 1 comment
Open

Ability to only mock current directory #906

jackstine opened this issue Jan 31, 2025 · 1 comment

Comments

@jackstine
Copy link

jackstine commented Jan 31, 2025

When using mockery --dir {} I would like to have the ability to just mock this folder, not the sub directories. I do not want to use --all or --name.

Maybe add config name --dir-only or --only-dir.

Currently it outputs

31 Jan 25 07:36 CST FTL Use --name to specify the name of the interface or --all for all interfaces found dry-run=false version=v2.51.1

Expected

It mocks only the files in that dir.

If you know where in the code, I'd be happy, if you showed me the place to start in the code, and I could post a PR for you, if you'd like.

@LandonTClipp
Copy link
Collaborator

Thanks for the submission. I don't know off the top of my head how to do this with the deprecated non-packages config scheme.

This can be easily done if you use the packages feature.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants