-
Notifications
You must be signed in to change notification settings - Fork 460
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
take toggleOffOn into account for linters #719
Comments
If For everything that The fix would be to make DetailsUnfortunately, this is behaving correctly. You can split code quality tools into two categories:
The great thing about "problem solvers" is that you can compose them. Your configuration block has several ( The terrible thing about "problem yellers" is that you can't compose them. They don't fix problems, they just yell about them. In the case of ktlint, it just yells about the first thing that it finds. If you fix the max line length on line 70, it will next yell about the problem on line 77. That's a big limitation of "yellers" as opposed to "fixers". Most tools are either problem yellers or solvers. Ktlint is the rare exception, where it seems to be 50/50. Which means that half the time it works great with Spotless, but the other half of the time it just shouts "everybody stop" and people are disappointed that it doesn't play nice with the rest of the Spotless infrastructure. One option is to look at [1] All "solvers" are at least a little "yeller". For example, if you pass C++ to |
Sorry for the late reply, just wanted to thank you for a great response. |
We can make this work in the future. Probably the |
First of all, I'm expecting a solution to this to be something extremely obvious but here it is.
Spotless setup in the project looks like this:
The problem occurs when trying to exclude a part of the code using
spotless:off
andspotless:on
I also tried (as seen in the snippet above) with different tags but running
./gradlew spotlessCheck
still fails.The part where it fails looks something like this:
Reason for failure:
What is it that I'm missing here?
The text was updated successfully, but these errors were encountered: