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

Block with just a comment doesn't indent the comment #32

Closed
belav opened this issue Mar 14, 2021 · 1 comment · Fixed by #62
Closed

Block with just a comment doesn't indent the comment #32

belav opened this issue Mar 14, 2021 · 1 comment · Fixed by #62
Assignees
Labels
area:formatting type:bug Something isn't working

Comments

@belav
Copy link
Owner

belav commented Mar 14, 2021

if (someBoolean)
{
// code using value
}

The comment is leading trivia on the closing brace. Currently leading trivia ends up indented at the same level as the token it is on.
Because we are changing line breaks/indenting we can't really depend on the existing whitespace in front of the comment.
This probably needs to be handled as a special case somehow. There may be other special cases like this.

@belav belav added the type:bug Something isn't working label Mar 14, 2021
@belav belav added this to the Beta milestone Mar 14, 2021
@belav
Copy link
Owner Author

belav commented Mar 22, 2021

Figure out #22 first just in case that affects this.

@belav belav self-assigned this Mar 29, 2021
belav added a commit that referenced this issue Apr 3, 2021
@shocklateboy92 shocklateboy92 linked a pull request Apr 4, 2021 that will close this issue
@belav belav closed this as completed in #62 Apr 4, 2021
belav added a commit that referenced this issue Apr 4, 2021
GH-32 indent comments inside closing brace
@belav belav removed this from the Beta milestone Jul 19, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:formatting type:bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant