Skip to content

Indent single-line comments in if expressions#591

Closed
cmwarrington wants to merge 1 commit intofacebook:mainfrom
cmwarrington:if_expression_comment
Closed

Indent single-line comments in if expressions#591
cmwarrington wants to merge 1 commit intofacebook:mainfrom
cmwarrington:if_expression_comment

Conversation

@cmwarrington
Copy link
Contributor

Before this change

fun foo() {
  if (expression)
  // comment
  bar()
}

After this change:

fun foo() {
  if (expression)
      // comment
      bar()
}

@meta-cla meta-cla bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Jan 27, 2026
@hick209
Copy link
Contributor

hick209 commented Jan 30, 2026

Amazing changes! Please update CHANGELOG.md and this should be good to be merged in!

@meta-codesync
Copy link

meta-codesync bot commented Jan 30, 2026

@hick209 has imported this pull request. If you are a Meta employee, you can view this in D91930465.

Copy link
Contributor

@cortinico cortinico left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review automatically exported from Phabricator review in Meta.

@cmwarrington cmwarrington force-pushed the if_expression_comment branch from a9138ba to 66cbabb Compare February 4, 2026 18:13
@cmwarrington
Copy link
Contributor Author

Amazing changes! Please update CHANGELOG.md and this should be good to be merged in!

Thanks! I updated the PR to add a line to the CHANGELOG.

Before this change

  fun foo() {
    if (expression)
    // comment
    bar()
  }

After this change:

  fun foo() {
    if (expression)
        // comment
        bar()
  }
@cmwarrington cmwarrington force-pushed the if_expression_comment branch from 66cbabb to 26e1b22 Compare February 4, 2026 18:18
@hick209
Copy link
Contributor

hick209 commented Feb 4, 2026

Seems like something got messed up as now the only changes available are the ones to the CHANGELOG.md file. I can try to merge all those on my end though.

@meta-codesync
Copy link

meta-codesync bot commented Feb 4, 2026

@hick209 merged this pull request in 5cbe19a.

@cmwarrington
Copy link
Contributor Author

Oops, sorry, thanks for fixing it up.

@cmwarrington cmwarrington deleted the if_expression_comment branch February 4, 2026 20:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. Merged

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants