-
Notifications
You must be signed in to change notification settings - Fork 276
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
formatter breaks code, making it non-compilable with indent.fewerBraces = beforeSelect and indent.significant = 1 #3590
Comments
Faced a similar issue when working on IntelliJ Formatter: |
Thanks for reporting! Which compiler version are you using? |
@unkarjedy what's the compiler version? this functionality was added very recently to the compiler, 3.3.1-rc1 or something like that |
Ah, I was using Scala 3.3.0. I will leave it here FTR: scala/scala3#17056 |
i think i mentioned this on the configuration doc page 🙂 https://scalameta.org/scalafmt/docs/configuration.html#indentfewerbraces |
Indeed. I was blind to the warning. |
@unkarjedy what do you think we should do? 🙂 i can add a check for this case and throw an exception. @odersky specifically implemented in the attached dotty issue that the difference must be more than one space, hence indentation of 1 contradicts that rule. |
I don't have a strong preference here. |
works for me. will try to add a warning message and reset to never. |
.scalafmt.conf
:before:
after:
That's actual for many other "beforeSelect" tests in OptionalBraces
The text was updated successfully, but these errors were encountered: