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

Broken AvoidInfix for new object expression #2830

Closed
DutchDestroyer opened this issue Oct 29, 2021 · 1 comment · Fixed by #2832
Closed

Broken AvoidInfix for new object expression #2830

DutchDestroyer opened this issue Oct 29, 2021 · 1 comment · Fixed by #2832

Comments

@DutchDestroyer
Copy link

This template is a guideline, not a strict requirement.

  • Version: 3.0.7
  • Integration: IntelliJ
  • Configuration:
version=3.0.7
maxColumn: 120

runner.dialect = scala213

rewrite.rules = [
  AvoidInfix
]

Steps

Given code like this:

new Test withOne true

When I run scalafmt like this:

scalafmt

Problem

Scalafmt formats code like this:

new Test.withOne(true)

Expectation

I would like the formatted output to look like this:

(new Test).withOne(true)
@DutchDestroyer
Copy link
Author

Already working on a fix with @vtols and @kazadbakht

tgodzik added a commit that referenced this issue Oct 29, 2021
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.

2 participants