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

"// format: off" enabled for comments, literals, etc. #1773

Merged
merged 6 commits into from Mar 11, 2020

Conversation

poslegm
Copy link
Collaborator

@poslegm poslegm commented Mar 9, 2020

Fixes #1424

@poslegm poslegm requested a review from kitbellew March 9, 2020 01:57
Copy link
Collaborator

@kitbellew kitbellew left a comment

Choose a reason for hiding this comment

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

one question, one optional.

@@ -71,6 +72,11 @@ class FormatWriter(formatOps: FormatOps) {
}

entry.formatWhitespace(sb)
Copy link
Collaborator

Choose a reason for hiding this comment

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

just curious: will this introduce any (unwanted) alignment here if format:off had been used?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Good catch, fixed in 1589507

Copy link
Collaborator

Choose a reason for hiding this comment

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

Sorry, didn't occur to me before: what about multiple spaces in the original code? Perhaps we should just add the contents of FormatToken.between?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Added test for multiple spaces 3185a37 Or did you mean other cases?

@poslegm poslegm requested a review from kitbellew March 11, 2020 12:03
@poslegm poslegm merged commit 0665045 into scalameta:master Mar 11, 2020
@poslegm poslegm deleted the comments-format-off branch March 11, 2020 14:57
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.

Multiline comments have * alignment changed with "format: off"
2 participants