Custom Spotless Task
See original GitHub issueHello!
I’m trying to create a custom spotless task that only acts on files changed in git. I would also like the option to act on all files, so ideally I would have two separate tasks. For example, spotlessJavaCheck
should check the pattern **/*.java
, while spotlessChangedCheck
should check only the files changed in git.
I’ve already written a function in the build script which identifies the changed files, and I would like to set the spotless target to these files.
Any advice?
Issue Analytics
- State:
- Created 4 years ago
- Comments:29 (29 by maintainers)
Top Results From Across the Web
Spotless on Android - Medium
Automate pre-commit script setup. Let's go back to the spotless.gradle file (or wherever you choose to define your spotless configuration) and add this...
Read more >diffplug/spotless - Gitter
First solution: just run ./gradlew spotlessApply build or ./gradlew spotlessApply check instead of just ./gradlew [build|check] . Spotless is reasonably fast, ...
Read more >Step by Step: How to setup ktlint with spotless? - SourceLevel
There's a small problem with spotless: it does not support custom ... gist pretty straightforward Gradle task for ktlint and HTML reporter.
Read more >FormatExtension (plugin-gradle 5.6.1 API) - Javadoc.io
Adds a spotless{Name}Check and spotless{Name}Apply task. ... An optional performance optimization if you are using any of the custom methods.
Read more >Using a Code Formatter - WPILib Docs
In the plugins {} block of your build.gradle , add the Spotless plugin so it ... You can also specify a specific task...
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
Ok that makes sense. Thank you for all the input you’ve given up to this point! I sincerely appreciate it; it has been quite helpful. I will keep looking into this and report back to let you and anyone else who is curious what I find.
For now I’ll close the ticket. Feel free to reopen if you like.
FYI,
-PspotlessFiles
has been deprecated and will be removed. Migration path available here: https://github.com/diffplug/spotless/pull/602