Skip to content

Conversation

@knutwannheden
Copy link
Contributor

When there is a trailing comment on the line of the nested statement which gets wrapped with braces, then the braces should remain a trailing comment for that statement.

So the code:

if (foo)
    return true; // early return

should be transformed into:

if (foo) {
    return true; // early return
}

When there is a trailing comment on the line of the nested statement which gets wrapped with braces, then the braces should remain a trailing comment for that statement.

So the code:

```java
if (foo)
    return true; // early return
```

should be transformed into:

```java
if (foo) {
    return true; // early return
}
```
@knutwannheden knutwannheden merged commit a37153b into main Jan 25, 2024
@knutwannheden knutwannheden deleted the need-braces-trailing-comments branch January 25, 2024 14:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

2 participants