-
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
rewrite.rules = [RedundantBraces]
causes regression for single line tuple values inside a try
#4108
Comments
rewrite.rules = [RedundantBraces]
causes regression for single line Tuple2
values inside a try
rewrite.rules = [RedundantBraces]
causes regression for single line tuple values inside a try
are you absolutely sure that you never build with any other versions of scala, such as those which require https://github.com/apache/pekko/blob/main/project/Dependencies.scala#L47 |
So to make it clear, the following command that fails to compile when the
Its |
the point is, you're compiling this file for scala212, then why do you expect your dialect to be scala213? i think we can once again qualify this as configuration error rather than a formatter bug. |
If I set |
Configuration (required)
Command-line parameters (required)
When I run scalafmt via CLI like this: scalafmt
Steps
Given code like this:
Problem
Scalafmt formats code like this:
Expectation
I would like the formatted output to look like this:
This is because removing the
}{
in thetry
block causes a compile error, i.e.Workaround
None aside from making scalafmt not working on that part of the code
Notes
See PR at apache/pekko#1408, failing code block is at https://github.com/mdedetrich/pekko/blob/5eb0aeea8a1043055d141bba3e287525e3ef5b47/remote/src/test/scala/org/apache/pekko/remote/classic/RemotingSpec.scala#L769-L792
The text was updated successfully, but these errors were encountered: