redhat-developer / redhat-developer/vscode-java
Formatter: Unexpected line breaks in braces when Record declares
Open
Nobody has claimed this yet.
enhancement
formatter
- Dominant language
- TypeScript
- Stars
- 2.3k
- Forks
- 546
- Avg merge
- 20h 1m
- Merged PRs (30d)
- 11
Description
When declaring Record, if the argument of an annotation is an array (using braces), the code formatter will wrap the braces in newline, and I think it should be better not to wrap the braces in this case.
Environment
- Operating System: macOS
- JDK version: 17.0.10
- Visual Studio Code version: 1.87.2 (Universal)
- Java extension version: 1.28.1
Current Result
Expected Result
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
No implementation files or tests are named. Reproduce the formatter behavior with a Java Record whose annotation argument is an array, then locate the formatter entry point and compare the output with the expected screenshot. Done means the braces remain on the intended line without the unexpected newline.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java, typescript
- Domain
- tooling
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100