-
Notifications
You must be signed in to change notification settings - Fork 440
Remove trailing whitespace in multi-line string literals of tests #1322
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
Conversation
@swift-ci Please test |
How many tests actually need this? Rintaro suggested that we could just have this inline on each of the tests instead. I'd also prefer it not be replaced with anything (ie. replace with empty string) and just be a marker for "keep this whitespace". |
FWIW, in swift-format we just write literal |
In mulit-line string literal tests these trailing whitespaces are really hard to spot but influence the test significantly. To make them more obvious, use `\u{20}`, which is visible in the editor and will be replaced by a normal space in `AssertParse` In all other cases where the trailing whitespace doesn’t matter, remove it.
f8cf3d5
to
fbecd19
Compare
I like the idea of using |
@swift-ci Please test |
1 similar comment
@swift-ci Please test |
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.
The commit comment doesn't really apply now, but looks good otherwise.
which is visible in the editor and will be replaced by a normal space in
AssertParse
It's not really "replaced" by AssertParse
any more - just by the compiler 😅.
Oh, I changed the commit message, just forgot to update the PR description. |
@swift-ci Please test macOS |
I was referring to the commit message as well, FWIW. |
In mulit-line string literal tests these trailing whitespaces are really hard to spot but influence the test significantly. To make them more obvious, use
\u{20}
, which is visible in the editor and will be replaced by a normal space inAssertParse
In all other cases where the trailing whitespace doesn’t matter, remove it.