If spotlessCheck fails, the error message could include a diff
See original GitHub issueThis would make it easier to understand what spotlessApply
would do, if it were called. If anybody wants to contribute this functionality:
FormatTask.formatCheck()
is where the exception is exception is thrown right now.Formatter.isClean(File)
is where the formatted and unformatted strings are both available. So that’s where you’d get the things to diff.
Issue Analytics
- State:
- Created 8 years ago
- Comments:5 (5 by maintainers)
Top Results From Across the Web
diffplug/spotless - Gitter
I am using spotless via gradle and want to throw an error if more than one ... Does anyone have a reference for...
Read more >Android project code style using Spotless and ktlint - Medium
The first one is checking the code style and fails with an error if there are some problems. The second one auto-formats the...
Read more >[#BEAM-6339] In certain cases, spotlessJava fails to work
Encounter following error when certain criteria exists in new code: > Task :beam-runners-google-cloud-dataflow-java:spotlessJava FAILED ...
Read more >Supported hooks - pre-commit
check-docstring-first - checks a common error of defining a docstring after code. check-executables-have-shebangs - ensures that (non-binary) executables have a ...
Read more >Could not determine the dependencies of task - Stack Overflow
for me, disabling minify on debug works, and I'm still able to build my production app with minify enabled. – KevinTydlacka. Aug 11,...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I’ve also a couple of suggestions regarding the new tests you’ve written, which I raised in my comments at https://github.com/diffplug/spotless/commit/15aeb77d30d6fa763de47db77deb5a166d14d132#commitcomment-19574416 and https://github.com/diffplug/spotless/commit/d5a770d65ccc604b9e9930df020a4417b87ec1a7#commitcomment-19574477.
Thought I’d link them here in case you missed them. 😃
Shipped in 2.3.0.