-
Notifications
You must be signed in to change notification settings - Fork 29.8k
Removes trailing whitespace from source files. #19329
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
Removes trailing whitespace from source files. #19329
Conversation
6558062 to
2dc2f99
Compare
dev/bots/test.dart
Outdated
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.
Shall we also include ".m" and ".mm"?
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.
Yes.
dev/bots/test.dart
Outdated
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.
Shall we only check files that are changed in the PR? That way, the check could be faster and we don't have to remove all the trailing spaces in this PR.
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.
Yeah, that's a good idea. It also means that we won't encounter false-positive issues in generated files.
dev/bots/test.dart
Outdated
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.
I like this. Copied to my PR: flutter/engine#5733
12bd1ea to
e65789a
Compare
|
OK, PTAL. The code now only checks for whitespace on changed files. |
e65789a to
6165345
Compare
|
The code looks good to me. However, some tests are failing... It seems that the branch master is not available on some test bots, and some unit tests are matching texts on those that we changed the white spaces. Maybe we can revert all those white spaces changes in this PR so it can pass the test, and then remove trailing spaces and refactor unit tests later? |
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.
Are these changes intentional?
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.
Yes. You can't tell from the diff, but there were raw formfeed characters in between the I and the J. I just changed these to make them more obvious and explicit. Same for the other lines in this file.
|
OK, I moved the presubmit check to #19412. I'll address the lack of a master branch there. |
9c8180f to
516b85b
Compare
516b85b to
d52a951
Compare
goderbauer
left a comment
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.
LGTM
| No valid code signing certificates were found | ||
| You can connect to your Apple Developer account by signing in with your Apple ID | ||
| in Xcode and create an iOS Development Certificate as well as a Provisioning | ||
| in Xcode and create an iOS Development Certificate as well as a Provisioning\u0020 |
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.
why?
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.
Because this line has an embedded space in the test, but I didn't want to just remove it, because it appeared that it was just mocking something that the real iOS tools output.
So I converted it to an escape sequence so that the whitespace presubmit check I have in the other PR won't fail because there's a space here. I'd really prefer a linter rule for EOL whitespace, but it doesn't exist yet.
I'm happy to just fix the test and remove the whitespace if you think that won't be a problem. If I did that, I'd just remove the last part of the string in the test.
There are only whitespace changes here, except for
packages/flutter/test/foundation/licenses_test.dart, where I replace some raw whitespace (line feed) with their unicode equivalents.I'm adding a presubmit check for this in #19412.