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

Support empty .mockery.yaml config #792

Open
1 of 5 tasks
austince opened this issue Jul 9, 2024 · 1 comment
Open
1 of 5 tasks

Support empty .mockery.yaml config #792

austince opened this issue Jul 9, 2024 · 1 comment

Comments

@austince
Copy link

austince commented Jul 9, 2024

Description

Support empty .mockery.yaml files. We have set up support for mockery for all packages in our repo but some do not (yet) need mocks. In order to avoid special-casing these packages in the generation commands, it would be great if mockery accepted this as a valid case and no-oped instead of failing.

Mockery Version

v2.43.2

Golang Version

1.22.4

Installation Method

  • Binary Distribution
  • Docker
  • brew
  • go install
  • Other: [specify]

Steps to Reproduce

  1. Create a .mockery.yaml config with the contents:
    1.  with-expecter: true
  2. Run mockery

Expected Behavior

Successful run with no generation.

Actual Behavior

Error

       09 Jul 24 11:12 EDT FTL Use --name to specify the name of the interface or --all for all interfaces found dry-run=false version=v2.43.2
@austince austince changed the title Support Support empty .mockery.yaml config Jul 9, 2024
@LandonTClipp
Copy link
Collaborator

If the intention is to use packages, then there is no feasible way to do this until we move to v3 and remove legacy configuration semantics. The existence of the packages config value is a feature flag that enables it. When mockery doesn't see this, it reverts to the old semantics.

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