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

Rewrite: replace delimiters with space #2121

Merged
merged 2 commits into from
Jul 25, 2020
Merged

Conversation

kitbellew
Copy link
Collaborator

@kitbellew kitbellew commented Jul 25, 2020

Parens/braces serve as delimiters (such as in "if(x"), so when we remove them, we must ensure that tokens before and after continue to be clearly separated. For that, let's just replace these delimiters with spaces, as formatter will remove any redundant space later.

Generalizes #2118.

@kitbellew kitbellew changed the title RedundantParens: insert space, or joins adjacent tokens Rewrite: replace delimiters with space Jul 25, 2020
Parens/braces serve as delimiters (such as in "if(x"), so when we remove
them, we must ensure that tokens before and after continue to be clearly
separated. For that, let's just replace these delimiters with spaces, as
formatter will remove any redundant space later.
Copy link
Contributor

@daddykotex daddykotex left a comment

Choose a reason for hiding this comment

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

Thanks for the feedback and the follow up PR

@kitbellew kitbellew merged commit 8a0014b into scalameta:master Jul 25, 2020
@kitbellew kitbellew deleted the 2118 branch July 25, 2020 13:11
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