Skip to content

Fixed empty function formatting error - #4740

Open
achowd32 wants to merge 1 commit into
google:mainfrom
achowd32:func-fix
Open

Fixed empty function formatting error#4740
achowd32 wants to merge 1 commit into
google:mainfrom
achowd32:func-fix

Conversation

@achowd32

Copy link
Copy Markdown
Contributor

A very small PR that aims to close #2377. It's fairly self-explanatory - the added code just checks if the empty function contains any comments; if so, then it adds a hard line before the closing curly braces. I believe this should always be correct, since emitted comment docs never have trailing hard lines, per the comment on lines 66-69.

Happy to answer any questions!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Formatter moves closing function brace to comment when body only contains comment

2 participants