GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Added support for generic NativeCmd step by tisoft · Pull Request #949 · diffplug/spotless

Conversation

@tisoft

@tisoft tisoft commented Sep 24, 2021

Copy link
Copy Markdown
Contributor

Allows to call locally installed binaries to format files

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@tisoft

tisoft commented Sep 24, 2021

Copy link
Copy Markdown
Contributor Author

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

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

nedtwigg
nedtwigg requested changes Sep 24, 2021
View reviewed changes

@nedtwigg nedtwigg left a comment

Copy link
Copy Markdown
Member

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

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread lib/src/main/java/com/diffplug/spotless/generic/NativeCmdStep.java Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread lib/src/main/java/com/diffplug/spotless/generic/NativeCmdStep.java Resolved

Uh oh!

There was an error while loading. Please reload this page.

@nedtwigg

nedtwigg commented Sep 24, 2021 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Member

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.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@tisoft
tisoft force-pushed the generic_native_cmd branch from af664dc to b59caa6 Compare September 25, 2021 13:25
@tisoft
tisoft requested a review from nedtwigg September 25, 2021 13:25
@tisoft

tisoft commented Sep 25, 2021

Copy link
Copy Markdown
Contributor Author
  • Added CHANGES.md entries
  • Added doc in README.md
  • Incorporated review comments
All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@nedtwigg

nedtwigg commented Sep 26, 2021

Copy link
Copy Markdown
Member

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

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@tisoft
tisoft force-pushed the generic_native_cmd branch from b59caa6 to e32fcbd Compare September 27, 2021 05:12
@tisoft
Added support for local binary formatters
7bf5ec0
@tisoft
tisoft force-pushed the generic_native_cmd branch from e32fcbd to 7bf5ec0 Compare September 27, 2021 05:19
@tisoft

tisoft commented Sep 27, 2021

Copy link
Copy Markdown
Contributor Author

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

nedtwigg reacted with thumbs up emoji
All reactions
  • 👍 1 reaction

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

nedtwigg
nedtwigg reviewed Sep 27, 2021
View reviewed changes
Comment thread lib/src/main/java/com/diffplug/spotless/generic/NativeCmdStep.java Resolved

Uh oh!

There was an error while loading. Please reload this page.

@nedtwigg

nedtwigg commented Sep 27, 2021

Copy link
Copy Markdown
Member

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

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@tisoft
Stay compatible with remote build cache
edf68d8
@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

nedtwigg commented Sep 27, 2021

Copy link
Copy Markdown
Member

Published in plugin-maven 2.14.0.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@carhartl carhartl mentioned this pull request Oct 9, 2021
Add Terraform formatter step #959
Closed
carhartl added a commit to carhartl/spotless that referenced this pull request Oct 11, 2021
@carhartl
Make NativeCmd step available in Gradle plugin
21689ce
Maven support had been added in diffplug#949.
carhartl added a commit to carhartl/spotless that referenced this pull request Oct 11, 2021
@carhartl
Make NativeCmd step available in Gradle plugin
d2f34ae
Maven support had been added in diffplug#949.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@nedtwigg nedtwigg nedtwigg requested changes

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

2 participants

@tisoft @nedtwigg
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.