Repository navigation
feat: improve throws breaking - #591
Merged
Merged
Conversation
jtkiesel
force-pushed
the
fix/improve-throws-formatting
branch
3 times, most recently
from
January 16, 2024 05:43
e46ab97 to
ea90004
Compare
jtkiesel
force-pushed
the
fix/improve-throws-formatting
branch
from
February 10, 2024 23:46
ea90004 to
e379f32
Compare
Contributor
Author
|
@clementdessoude I'm curious what your thoughts are on the formatting decisions I made here. Could you take a look, whenever you have the time? |
jtkiesel
force-pushed
the
fix/improve-throws-formatting
branch
from
April 10, 2024 06:36
e379f32 to
8ec1626
Compare
This was referenced Jul 13, 2026
jtkiesel
force-pushed
the
fix/improve-throws-formatting
branch
from
October 13, 2026 07:03
8ec1626 to
feb3575
Compare
jtkiesel
force-pushed
the
fix/improve-throws-formatting
branch
from
October 13, 2026 07:04
feb3575 to
6249ec0
Compare
jtkiesel
force-pushed
the
fix/improve-throws-formatting
branch
from
October 13, 2026 08:00
6249ec0 to
16af6f7
Compare
jtkiesel
force-pushed
the
fix/improve-throws-formatting
branch
from
October 14, 2026 04:50
16af6f7 to
4878fd3
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
What changed with this PR:
Constructors/methods with
throwsclauses with multiple exception types may now break on their comma-separated list of exception types, and the left curly brace of the body is broken onto its own line when the throws clause is broken in order to separate the exception classes from the body (since they will be at the same indentation).The formatting decisions here are strongly inspired by and aligned with the way the
implementsclause is printed on Prettier TypeScript (and Java) classes, as they are syntactically similar.Example
Input
Output
Relative issues or prs:
Closes #429