Skip to content

Spotless now integrates with black, but it could be better #347

@nedtwigg

Description

@nedtwigg

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 diffplug/spotless#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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions