-
Notifications
You must be signed in to change notification settings - Fork 459
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
Conversation
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 |
There was a problem hiding this 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).
lib/src/main/java/com/diffplug/spotless/generic/NativeCmdStep.java
Outdated
Show resolved
Hide resolved
lib/src/main/java/com/diffplug/spotless/generic/NativeCmdStep.java
Outdated
Show resolved
Hide resolved
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. |
af664dc
to
b59caa6
Compare
|
Please merge the latest |
b59caa6
to
e32fcbd
Compare
e32fcbd
to
7bf5ec0
Compare
@nedtwigg rebased against main and fixed one copyright date. The test failure seems unrelated to me. |
lib/src/main/java/com/diffplug/spotless/generic/NativeCmdStep.java
Outdated
Show resolved
Hide resolved
Agree re: test faillure. I would merge if there wasn't low-hanging fruit re: the absolute path. |
Published in |
Maven support had been added in diffplug#949.
Maven support had been added in diffplug#949.
Allows to call locally installed binaries to format files