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

Add --prevent-empty-failure flag #188

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

vzqzac
Copy link

@vzqzac vzqzac commented Oct 17, 2020

This flag aims to prevent a failure throw when there are no files that
match either the given glob or the default one, this can be helpful in
some cases such as some pre-commit hooks that run against the diff-ed
files, for example:

Commiting files that do not include any erb extension, then, running
linters as part of a pre-commit check, including (as an example) rubocop,
reek, stylelint, fasterer, and erb-lint, would throw an error since there are no
files to run erb-lint against, preventing the user to properly create a
commit.

Note: The flag name might not be the most suitable, open to discuss a better one 😄

This flag aims to prevent a failure throw when there are no files that
match either the given glob or the default one, this can be helpful in
some cases such as some pre-commit hooks that run against the diff-ed
files, for example:

Commiting files that do not include any erb extension, then, running
linters as part of a pre-commit check, including (as an example) rubocop,
reek, stylelint, fasterer, and erb-lint, would throw an error since there are no
files to run erb-lint against, preventing the user to properly create a
commit.
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

Successfully merging this pull request may close these issues.

3 participants