Skip to content
This repository was archived by the owner on Jan 13, 2026. It is now read-only.

While loop condition spaces#131

Merged
nielsdebruin merged 3 commits intomainfrom
fix/spaces-while-loop
Jan 24, 2025
Merged

While loop condition spaces#131
nielsdebruin merged 3 commits intomainfrom
fix/spaces-while-loop

Conversation

@nielsdebruin
Copy link
Contributor

What's changed?

This PR adds a fix and extra test for while loops to the SpaceVisitor, ensuring the while loop conditions have proper spacing.

What's your motivation?

Anything in particular you'd like reviewers to focus on?

Anyone you would like to review specifically?

Have you considered any alternatives or workarounds?

Any additional context

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

@nielsdebruin nielsdebruin added bug Something isn't working enhancement New feature or request labels Jan 23, 2025
@nielsdebruin nielsdebruin self-assigned this Jan 23, 2025
from typing import Optional, cast, List, TypeVar

import rewrite.java as j
from java import WhileLoop
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks strange. I think we should import from rewrite.java like all the others.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed

@nielsdebruin nielsdebruin merged commit 63c78c7 into main Jan 24, 2025
1 check passed
@nielsdebruin nielsdebruin deleted the fix/spaces-while-loop branch January 24, 2025 09:57
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

bug Something isn't working enhancement New feature or request

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

2 participants