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

Scala 3: newlines.source = keep doesn't preserve line break before then #3033

Closed
SethTisue opened this issue Jan 6, 2022 · 1 comment · Fixed by #3037
Closed

Scala 3: newlines.source = keep doesn't preserve line break before then #3033

SethTisue opened this issue Jan 6, 2022 · 1 comment · Fixed by #3037

Comments

@SethTisue
Copy link
Contributor

  • Version: 3.2.1
  • Configuration:
version = 3.2.1
runner.dialect = scala3
newlines.source = keep

Steps

Given code like this:

class C:
  if true
  then 3
  else 4

When I run scalafmt like this:

scalafmt .

Problem

Scalafmt formats code like this:

class C:
  if true then 3
  else 4

Expectation

I would like the formatted output to be exactly the same as the input.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant