Replies: 3 comments 5 replies
-
This would be a great idea, it is tracked at Implementing it is blocked by If someone is eager to build it, the API's in #1096 are stable, you can make a PR against that and it will get merged eventually. |
Beta Was this translation helpful? Give feedback.
-
Ah that's a slightly different approach; would still work but from what I understand it still has some dependencies. I could see the violations format being more broadly applicable, so I understand why you'd nudge towards that existing effort. With code-suggester you'd run |
Beta Was this translation helpful? Give feedback.
-
This relates with https://github.com/solven-eu/cleanthat#github-app-freepaid which is GitHub App, applying automatically Spotless to unprotected branches, and opening PR for protected branches. |
Beta Was this translation helpful? Give feedback.
-
Hi! Couldn't find anything related through search; please correct me if this is not the right place to suggest such a new feature.
Background
Lately I've been contributing to Apache Maven, which uses Spotless to enforce formatting; as they've implemented it, the build pipeline breaks and it's up to the developer to apply spotless manually and push a new commit.
Idea
Instead I'd hope to see a Spotless GitHub Action developed & applied which takes the diff as created through
spotless:apply
and uses for instance googleapis/code-suggester to create code suggestion comments on the pull request.This way the developer or reviewer is able to quickly apply all formatting directly from the pull request view, instead of having to checkout a local copy, run spotless again, and commit the resulting changes.
Technically it seems the components are already mostly there, especially when leveraging code-suggester. Having this available as an official GitHub Action could take away some of the friction experienced when using Spotless, especially for incidental contributors.
Beta Was this translation helpful? Give feedback.
All reactions