-
Notifications
You must be signed in to change notification settings - Fork 277
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
ScalafmtRunner: add dialectOverride #3300
Conversation
With dialect overrides to be added subsequently, comparing dialects for reference equality is no longer sufficient.
Also, make a copy in config, to enable subsequent dialect override.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, but I do have a question about the usability. Isn't it harder for the user to try to figure this out instead of having relevant predefined dialects?
assert(!config1.runner.getDialect.allowToplevelTerms) | ||
val config2 = Config | ||
.fromHoconString(""" | ||
|runner.dialectOverride.allowToplevelTerms = true |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is it only needed for toplevel terms ? Maybe we should have a dialect for scripts instead?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
not at all, this is just a test to show that override works.
while having predefined dialects works well, we have had complaints in the past when some change in scala3 was backported to Scala 2, or kind projector plugin had a new feature, and rather than us trying to keep up, this will allow people to enable features themselves. |
No description provided.