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 — Remove default style choice from `CustomImportOrder` by Laurens-W · Pull Request #573 · openrewrite/rewrite-static-analysis

Conversation

@Laurens-W

@Laurens-W Laurens-W commented May 28, 2025

Copy link
Copy Markdown
Contributor

What's changed?

Removed the default selection of Checkstyle::customImportOrderStyle

What's your motivation?

This recipe is currently changing imports even on projects that do not use Checkstyle

Checklist

  • I've added unit tests to cover both positive and negative cases
  • I've read and applied the recipe conventions and best practices
  • I've used the IntelliJ IDEA auto-formatter on affected files

Sorry, something went wrong.

Uh oh!

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

All reactions
@Laurens-W
Remove the default Checkstyle::customImportOrderStyle so the recipe d…
ee749d0
…oesn't make changes unless a style is explicitly configured
@Laurens-W Laurens-W self-assigned this May 28, 2025
@Laurens-W Laurens-W added the bug Something isn't working label May 28, 2025
@moderne-meeseeks moderne-meeseeks Bot added this to OpenRewrite May 28, 2025
@github-project-automation github-project-automation Bot moved this to In Progress in OpenRewrite May 28, 2025
@Laurens-W

Laurens-W commented May 28, 2025

Copy link
Copy Markdown
Contributor Author

Should we add a regression test that verifies nothing is changed even when the imports are in an unexpected order?
Feels weird that all the tests still succeed after removing the default style

All reactions

Sorry, something went wrong.

Uh oh!

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

github-actions[bot]
github-actions Bot reviewed May 28, 2025
View reviewed changes

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

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.

Some suggestions could not be made:

  • src/main/java/org/openrewrite/staticanalysis/CustomImportOrder.java
    • lines 24-24

Sorry, something went wrong.

Uh oh!

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

All reactions
@pstreef

pstreef commented May 28, 2025

Copy link
Copy Markdown
Contributor

Should we add a regression test that verifies nothing is changed even when the imports are in an unexpected order? Feels weird that all the tests still succeed after removing the default style

yes, that would be good. From this alone I'm not confident this will solve the reported issue.

Laurens-W 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.

@timtebeek
timtebeek merged commit 9c768d2 into main May 28, 2025
@timtebeek
timtebeek deleted the remove-default-checkstyle-from-custom-import-order branch May 28, 2025 13:22
@github-project-automation github-project-automation Bot moved this from In Progress to Done in OpenRewrite May 28, 2025
@JohannisK JohannisK mentioned this pull request May 28, 2025
Add Regressiontest to verify no default import order style is applied #574
Closed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@github-actions github-actions[bot] github-actions[bot] left review comments

Uh oh!

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

Assignees

@Laurens-W Laurens-W

Labels

bug Something isn't working

Projects

OpenRewrite
Archived in project

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.

3 participants

@Laurens-W @pstreef @timtebeek
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 01402775 — 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.