pygradle icon indicating copy to clipboard operation
pygradle copied to clipboard

Spotless now integrates with black, but it could be better

Open nedtwigg opened this issue 5 years ago • 0 comments

Spotless is a code formatting plugin. It's main value adds are:

  • it lets you compose multiple formatters (e.g. black + a license header that slurps copyright info from git history)
  • it fixes lots of common bugs in formatters (idempotence, misconfigured encodings, fighting with git over line endings)
  • your format gets really fast thanks to incremental build, local and remote build cache, etc.
  • you can ratchet your formatting so there's never a "format the world" commit

We just shipped support for black, but we have a not-so-great user setup experience, in that we:

  • just use the black that's on your path
  • or you have to point us to the exact executable manually :(

Anyway, it would be great to improve this behavior, which we're tracking at https://github.com/diffplug/spotless/issues/674. One way we could do it is for spotless to apply pygradle, or pygradle could apply spotless. Not sure which is better... Apologies if this is off-topic, feel free to close.

nedtwigg avatar Aug 25 '20 07:08 nedtwigg