Skip to content

Conversation

@tisoft
Copy link
Contributor

Allows to call locally installed binaries to format files

@tisoft
Copy link
ContributorAuthor

Would like to use this, to call a custom formatter, that is installed locally, but can't be added as a "real" formatter into spotless.

TODO: Support writing the unformatted string to a temp file and read it back from another (or the same) file

Copy link
Member

@nedtwiggnedtwigg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cool feature, needs docs and changelog entries (root and plugin-maven).

@nedtwigg
Copy link
Member

nedtwigg commented Sep 24, 2021

TODO: Support writing the unformatted string to a temp file and read it back from another (or the same) file

This feature is best left unimplemented, imo. stdin/stdout are perfectly suited for this purpose. Unless you absolutely, unavoidably need filebased-IO for a usecase you have right now, I think we're better off leaving this out. 100% guarantee people waste hours fiddling with the filename, whether its local or relative, tools that don't flush filesystem cache, etc, not to mention performance.

@tisoft
Copy link
ContributorAuthor

  • Added CHANGES.md entries
  • Added doc in README.md
  • Incorporated review comments

@nedtwigg
Copy link
Member

Please merge the latest origin/main into this PR. That should fix CI, at which point I can merge and release.

@tisoft
Copy link
ContributorAuthor

@nedtwigg rebased against main and fixed one copyright date. The test failure seems unrelated to me.

@nedtwigg
Copy link
Member

Agree re: test faillure. I would merge if there wasn't low-hanging fruit re: the absolute path.

@nedtwiggnedtwigg merged commit 12aac3c into diffplug:mainSep 27, 2021
@tisofttisoft deleted the generic_native_cmd branch September 27, 2021 05:55
@nedtwigg
Copy link
Member

Published in plugin-maven 2.14.0.

@carhartlcarhartl mentioned this pull request Oct 9, 2021
carhartl added a commit to carhartl/spotless that referenced this pull request Oct 11, 2021
carhartl added a commit to carhartl/spotless that referenced this pull request Oct 11, 2021
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

@tisoft@nedtwigg