Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added support for generic NativeCmd step #949

Merged
merged 2 commits into from
Sep 27, 2021

Conversation

tisoft
Copy link
Contributor

@tisoft tisoft commented Sep 24, 2021

Allows to call locally installed binaries to format files

@tisoft
Copy link
Contributor Author

tisoft commented Sep 24, 2021

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

@nedtwigg nedtwigg 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
Contributor Author

tisoft commented Sep 25, 2021

  • 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
Contributor Author

tisoft commented Sep 27, 2021

@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.

@nedtwigg nedtwigg merged commit 12aac3c into diffplug:main Sep 27, 2021
@tisoft tisoft deleted the generic_native_cmd branch September 27, 2021 05:55
@nedtwigg
Copy link
Member

Published in plugin-maven 2.14.0.

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 free to 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