Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update formatter to handle record closing braces correctly #8106

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

mbien
Copy link
Member

@mbien mbien commented Jan 2, 2025

alternative to #8101 contributed by @homberghp,

rebased and moves the new regression test to FormattingTest.

  • adds tests to show the error
  • adds inner and outer record in ui template text for setting java format spaces
  • solves the error by moving spaces(cs.spaceWithinMethodDeclParens() ? 1 : 0, true); to the correct place.

fixes #7043

…ition

 - adds tests to show the error
 - adds inner and outer record in ui template text for setting java
   format spaces
 - solves the error by moving spaces(cs.spaceWithinMethodDeclParens() ? 1 : 0, true);  to the correct place.

Co-authored-by: Michael Bien <mbien42@gmail.com>
@mbien mbien added Java [ci] enable extra Java tests (java.completion, java.source.base, java.hints, refactoring.java, form) ci:dev-build [ci] produce a dev-build zip artifact (7 days expiration, see link on workflow summary page) labels Jan 2, 2025
@mbien mbien added this to the NB25 milestone Jan 2, 2025
Copy link
Contributor

@matthiasblaesing matthiasblaesing left a comment

Choose a reason for hiding this comment

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

The change from @homberghp makes sense and the new test and the existing still working record formatting test indicate that this is a safe change.

I also agree that it is more in line with the rest of the module that the test is integrated into FormatingTest.

@homberghp @mbien thank you both.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ci:dev-build [ci] produce a dev-build zip artifact (7 days expiration, see link on workflow summary page) Java [ci] enable extra Java tests (java.completion, java.source.base, java.hints, refactoring.java, form)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

reformat of record wrongly indents closing brace
3 participants