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

Use lenient dialect in scalafix-reflect. (Fix #543) #544

Merged
merged 2 commits into from
Jan 4, 2018

Conversation

olafurpg
Copy link
Contributor

@olafurpg olafurpg commented Jan 4, 2018

No description provided.

This flag makes the parser fail in valid 2.x code where inline is
an accepted identifier.
@olafurpg olafurpg requested a review from gabro January 4, 2018 18:15
@@ -77,7 +77,7 @@ object ScalafixConfig {
// Are extractor varargs specified using colons, i.e. is `case Extractor(xs: _*)` legal or not?
allowColonForExtractorVarargs = true,
// Are inline vals and defs supported by this dialect?
allowInlineMods = true,
allowInlineMods = false,
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what's this about?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm trying to minimize the breaking change by switching the parser. If a rule previously used inline as an identifier then it would compile with reflect before this commit but not after. It's the only custom flag in DefaultDialect that removes features from the original dialect, the other flags only enable the dialect to parse more files.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Clear, thanks!

Copy link
Collaborator

@gabro gabro left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 I have a question, about allowInlineMods but otherwise LGTM

@olafurpg olafurpg merged commit b0cf0bf into scalacenter:master Jan 4, 2018
@olafurpg olafurpg deleted the lenient-dialect-reflect branch January 4, 2018 18:22
@MasseGuillaume MasseGuillaume changed the title Fix #543. Use lenient dialect in scalafix-reflect Use lenient dialect in scalafix-reflect. (Fix #543) Jan 25, 2018
@MasseGuillaume MasseGuillaume added this to the v0.5.8 milestone Jan 25, 2018
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 this pull request may close these issues.

None yet

3 participants