-
Notifications
You must be signed in to change notification settings - Fork 84
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
Skip creation of empty files if there are no mocks to generate #250
Comments
An empty file implies an empty output. |
I want to ensure that first-time users are not confused if no file is generated. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
What did you do?
Run
mockolo -s <SOURCE> -d <DESTINATION>
on the source folder which doesn't have protocols withmockable
annotation.It generated a file without any mocks.
What did you expect to happen?
I'd expect the empty file won't be created. Or at least having a flag which allows to skip creation of those empty files.
I recognise that the tools also will need to remove the destination file in that case which adds some complications but still, arguable it's worth it.
What is the use-case
If in a modularised project the script is executed once per module, modules which not yet added mock annotation will end up having empty files which is not ideal.
Mockolo Environment
Mockolo Version: 2.0.1
Dependency Manager: Homebrew
Xcode Version: 15.0
The text was updated successfully, but these errors were encountered: