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

fail-on-error #924

Open
sbp-bvanb opened this issue Feb 21, 2025 · 5 comments
Open

fail-on-error #924

sbp-bvanb opened this issue Feb 21, 2025 · 5 comments

Comments

@sbp-bvanb
Copy link

When mockery is run and either ERR or WRN is shown, the mockery continues, but I want to see it exits with 1.

version=v2.52.2

@LandonTClipp
Copy link
Collaborator

Warnings are by definition not fatal. I'm curious where it's logging an error and not exiting with non-zero.

I'm happy to entertain how this could be different (or even better, configurable).

@sbp-bvanb
Copy link
Author

sbp-bvanb commented Feb 25, 2025

If an interface is defined in the mockery yaml, but not in code, then a WRN is shown while in my opinion that should be a fatal (exit 1).

@LandonTClipp
Copy link
Collaborator

Maybe so, but we cannot suddenly start causing mockery to fail in such a case because it would be a backwards incompatible change.

@sbp-bvanb
Copy link
Author

Yes of course, but you can add a flag so the default will not break.

@LandonTClipp
Copy link
Collaborator

Actually, one thing I will do is modify the v3 behavior to be like what you suggest: #929 So at least we will have that.

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