-
Notifications
You must be signed in to change notification settings - Fork 464
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
Feature suggestion: Fail compile on file contents #46
Comments
Great idea! The exceptions are actually swallowed not by the custom block but by a higher part of Spotless. Some of the complex formatters (especially eclipse) can barf on some inputs, and we didn't want a finnicky formatter library to block a user's build. How about if we let |
I think your suggestion sounds very simple and great. |
Now available in 2.4.0-SNAPSHOT. There's an integration test that shows what it looks like in practice here. Any comments before we ship? |
Looks good to me. Thanks for implementing my suggestion. |
Shipped in 2.4.0. |
It's very nice that we can automatically reformat code and replace things with spotless, but we also have sometimes problems that aren't easily fixed by replacements (for example missing license headers (no, just adding them automatically doesn't work because we want to list contributors and so on), usage of prohibited/deprecated classes, swear words in comments and so on.
It would be great if we could do something like
of course that's a very rough example. The currect "custom" block unfortunately eats all exceptions more or less silently ("Unable to apply step "), else that would be a workaround by just replacing nothing and throwing an exception.
The text was updated successfully, but these errors were encountered: