-
Notifications
You must be signed in to change notification settings - Fork 466
Improve gradle spotless apply suggestion #578
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
Improve gradle spotless apply suggestion #578
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks! A few small problems noted below. Main problem is that our CI didn't run on this PR, which I believe I just fixed.
I assume that you are working on a very large project. Does it happen often that you have problems in two+ projects? The ultimate form of this PR would be to somehow aggregate failures across all invocations of spotlessCheck
, and combine it into one error message. I'm definitely not asking for that PR, and infact we would reject it at the moment because we need to merge #576 first, but I am curious if you feel you would benefit from it or not.
plugin-gradle/src/main/java/com/diffplug/gradle/spotless/SpotlessTask.java
Outdated
Show resolved
Hide resolved
plugin-gradle/src/main/java/com/diffplug/gradle/spotless/SpotlessTask.java
Outdated
Show resolved
Hide resolved
plugin-gradle/src/main/java/com/diffplug/gradle/spotless/SpotlessTask.java
Outdated
Show resolved
Hide resolved
plugin-gradle/src/test/java/com/diffplug/gradle/spotless/TestFixtures.java
Show resolved
Hide resolved
I was thinking if gathering all tasks end have one message that tells you all the paths to a apply would be a good solution here. In general that would only apply if you ran gradle with --continue or maybe with running |
0ce547d
to
3008178
Compare
I've rebased and updated the PR against latest master |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Gonna let this breathe for a couple days before merging and releasing.
The OS fix makes it easier to merge :) |
Released in plugin-gradle |
I don't know how to detect this, but Windows PowerShell requires |
This PR adds a minor improvement to the suggestion message
to
which results in
Especially for larger multi project builds, this makes copy pasting the suggested fix easier and more efficient as it only runs on the problematic project and not on all projects in the multi project build.