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 — Support google-java-format's skip-reflowing-long-strings option by tbroyer · Pull Request #929 · diffplug/spotless

Conversation

@tbroyer

@tbroyer tbroyer commented Sep 4, 2021

Copy link
Copy Markdown
Contributor

Add configuration option to switch the option of the googleJavaFormat step.
Default to not reflowing for backwards compatibility.

Fixes #924

Sorry, something went wrong.

Uh oh!

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

All reactions
tbroyer added 4 commits September 4, 2021 20:36
@tbroyer
Fix google-java-format test when run with JDK 8
ecca2b8
@tbroyer
Support google-java-format's skip-reflowing-long-strings option
d79b5f3
Add configuration option to switch the option of the
googleJavaFormat step.
Default to not reflowing for backwards compatibility.

Fixes diffplug#924
@tbroyer
Add changelog entries
a15fcee
@tbroyer
Add plugin-maven test
2b4dd07
@jbduncan

jbduncan commented Sep 4, 2021

Copy link
Copy Markdown
Member

@tbroyer Thank you very much for your contribution!

The only thing I'm questioning is, given how many parameters GoogleJavaFormatStep::create has now, if we'd benefit from replacing its new variation with a builder. @tbroyer @nedtwigg What do you think?

If we decide the answer is "no", then I wonder if it would be best for the boolean parameter to come before the Provisioner, as provisioners are a Spotless concept, and moving it to the right of the other parameters might be easiest to understand.

Other than that, this PR LGTM, so well done and thanks again!

All reactions

Sorry, something went wrong.

Uh oh!

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

@nedtwigg

nedtwigg commented Sep 4, 2021

Copy link
Copy Markdown
Member

I agree with @jbduncan that this would be easier to read if we had a builder. But because the list of parameters is so long, I think it's hopeless to worry about the parameter positions. I'm going to merge and release as-is, but a future refactor towards a builder would be welcome. My guess is that this will be the last feature anyone is able to add before they're forced to confront the builder mess.

All reactions

Sorry, something went wrong.

Uh oh!

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

@nedtwigg
nedtwigg merged commit a7e93c8 into diffplug:main Sep 4, 2021
@nedtwigg

nedtwigg commented Sep 5, 2021

Copy link
Copy Markdown
Member

Released in plugin-gradle 5.15.0 and plugin-maven 2.13.0

All reactions

Sorry, something went wrong.

Uh oh!

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

@tbroyer
tbroyer deleted the 924-googlejavaformat-reflowlongstrings branch September 5, 2021 10:36
@tbroyer

tbroyer commented Sep 5, 2021

Copy link
Copy Markdown
Contributor Author

Fwiw, tests aren't actually run with JDK 8 on CI ; causing a risk of regressions that won't be detected. Not sure how much you care about it.

All reactions

Sorry, something went wrong.

Uh oh!

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

@nedtwigg

nedtwigg commented Sep 6, 2021 •
edited
Loading

Uh oh!

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

Copy link
Copy Markdown
Member

I think we test JDK 8, but windows-only. Agreed that it's a bit hidden.

spotless/.circleci/config.yml

Lines 115 to 125 in 2b62d00

executor:
name: win/default
shell: cmd.exe
steps:
- checkout
- run:
name: install
command: choco install ojdkbuild8
- run:
name: gradlew check
command: gradlew check --build-cache -PSPOTLESS_EXCLUDE_MAVEN=true

We get enough flaky dep-resolution problems that I don't want to trigger manual retries for every cell in the win/unix vs 8/11/latest matrix.

All reactions

Sorry, something went wrong.

Uh oh!

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

@tbroyer

tbroyer commented Sep 6, 2021

Copy link
Copy Markdown
Contributor Author

Strange, this test should have failed for months if that was the case: ecca2b8

All reactions

Sorry, something went wrong.

Uh oh!

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

@nedtwigg nedtwigg mentioned this pull request Sep 6, 2021
Make sure we are running CI on Java 8 #930
Closed
@kevinb9n kevinb9n mentioned this pull request Aug 22, 2022
Support google-java-format --skip-javadoc-formatting? #1287
Closed
@mokamoto12 mokamoto12 mentioned this pull request Aug 30, 2023
Support google-java-format's skip-javadoc-formatting option #1793
Merged
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

No reviews

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.

Google Java Format doesn't reflow long strings

Uh oh!

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

3 participants

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