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 |
nedtwigg
left a comment
There was a problem hiding this comment.
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