-
Notifications
You must be signed in to change notification settings - Fork 29.7k
Adjust repo config for VS Code formatting #122758
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
|
It looks like this pull request may not have tests. Please make sure to add tests before merging. If you need an exemption to this rule, contact Hixie on the #hackers channel in Chat (don't just cc him here, he won't see it! He's on Discord!). If you are not sure if you need tests, consider this rule of thumb: the purpose of a test is to make sure someone doesn't accidentally revert the fix. Ask yourself, is there anything in your PR that you feel it is important we not accidentally revert back to how it was before your fix? Reviewers: Read the Tree Hygiene page and make sure this patch meets those guidelines before LGTMing. |
|
@DanTup is my understanding of user vs. workspace settings + language-specific settings correct? |
DanTup
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.
Yes, you're right - I overlooked this in the last review 🙈
We should also add editor.formatOnPaste. That's what I meant to include in the comment at #122048 (comment) but apparently just included formatOnSave again.
timsneath
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!
|
test-exempt: configuration change |
|
@guidezpl I also noticed this: which suggests the following config change: If we can add that one also, I think we can delete the wiki VSCode configuration section, which will reduce additional configuration toil for contributors. Any chance you can add this to this PR? |
Nice, I'll add it and edit the wiki. |
flutter/flutter@be45eb2...f740544 2023-04-14 [email protected] Roll Flutter Engine from b7b2e7b742aa to 4b96e38c9275 (1 revision) (flutter/flutter#124856) 2023-04-14 [email protected] Adjust repo config for VS Code formatting (flutter/flutter#122758) 2023-04-14 [email protected] Roll Flutter Engine from 4f86a05ac932 to b7b2e7b742aa (4 revisions) (flutter/flutter#124845) 2023-04-14 [email protected] Roll Flutter Engine from 00bef00f64a7 to 4f86a05ac932 (5 revisions) (flutter/flutter#124841) 2023-04-14 [email protected] Roll Flutter Engine from ad222b0c93b9 to 00bef00f64a7 (1 revision) (flutter/flutter#124837) 2023-04-14 [email protected] [flutter_tools] Reorganize android_studio_test.dart (flutter/flutter#124834) 2023-04-14 [email protected] Roll Flutter Engine from ce7be0093399 to ad222b0c93b9 (1 revision) (flutter/flutter#124832) 2023-04-14 [email protected] Remove Finder extended attributes in build target before code signing iOS frameworks (flutter/flutter#123896) 2023-04-14 [email protected] flutter-tool, web: update HTML template serviceWorkerVersion to be const (flutter/flutter#124826) 2023-04-14 [email protected] Fix `CupertinoContextMenu` throws exception on route animation (flutter/flutter#124785) 2023-04-14 [email protected] flutter-tool: enum cleanup (flutter/flutter#124760) 2023-04-14 [email protected] Roll Flutter Engine from 1289f4b513ef to ce7be0093399 (1 revision) (flutter/flutter#124825) 2023-04-13 49699333+dependabot[bot]@users.noreply.github.com Bump actions/checkout from 3.5.1 to 3.5.2 (flutter/flutter#124822) 2023-04-13 [email protected] Roll Flutter Engine from 2ff14d733daa to 1289f4b513ef (2 revisions) (flutter/flutter#124824) 2023-04-13 [email protected] Roll Flutter Engine from eb3e7d52ebbc to 2ff14d733daa (1 revision) (flutter/flutter#124820) 2023-04-13 [email protected] i123643 print java version gradle (flutter/flutter#123644) 2023-04-13 [email protected] Roll Flutter Engine from 496543715bdb to eb3e7d52ebbc (3 revisions) (flutter/flutter#124816) 2023-04-13 [email protected] Roll pub packages (flutter/flutter#124709) 2023-04-13 [email protected] [flutter_tools] Disable flaky `output_web_test` test case (flutter/flutter#124257) 2023-04-13 [email protected] Roll Flutter Engine from 26eddb64e8ea to 496543715bdb (1 revision) (flutter/flutter#124812) 2023-04-13 [email protected] Refactor `SliverAppBar.medium` & `SliverAppBar.large` to fix several issues (flutter/flutter#122542) 2023-04-13 [email protected] Improve the docs around the TextSelectionHandleControls deprecations (flutter/flutter#123827) 2023-04-13 [email protected] Roll Packages from fe5615f to d01f4ea (5 revisions) (flutter/flutter#124795) 2023-04-13 [email protected] Roll Flutter Engine from 81a57d24e62a to 26eddb64e8ea (1 revision) (flutter/flutter#124794) If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/flutter-packages Please CC [email protected],[email protected],[email protected] on the revert to ensure that a human is aware of the problem. To file a bug in Packages: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
If someone's user settings include the following, the current workspace
level formatting settings don't apply since they aren't as specific.
```
"[dart]": {
"editor.formatOnSave": true,
"editor.formatOnType": true,
}
```
This PR handles this by turning off auto-formatting specifically for
Dart files.
This PR also adds `"files.trimTrailingWhitespace": true` to simplify
[contribution
guide](https://github.com/flutter/flutter/wiki/Setting-up-the-Framework-development-environment#set-up-your-environment).
Fixes flutter#122050. This change is
test-exempt.
## Pre-launch Checklist
- [x] I read the [Contributor Guide] and followed the process outlined
there for submitting PRs.
- [x] I read the [Tree Hygiene] wiki page, which explains my
responsibilities.
- [x] I read and followed the [Flutter Style Guide], including [Features
we expect every widget to implement].
- [x] I signed the [CLA].
- [x] I listed at least one issue that this PR fixes in the description
above.
- [x] I updated/added relevant documentation (doc comments with `///`).
- [x] I added new tests to check the change I am making, or this PR is
[test-exempt].
- [x] All existing and new tests are passing.
flutter/flutter@be45eb2...f740544 2023-04-14 [email protected] Roll Flutter Engine from b7b2e7b742aa to 4b96e38c9275 (1 revision) (flutter/flutter#124856) 2023-04-14 [email protected] Adjust repo config for VS Code formatting (flutter/flutter#122758) 2023-04-14 [email protected] Roll Flutter Engine from 4f86a05ac932 to b7b2e7b742aa (4 revisions) (flutter/flutter#124845) 2023-04-14 [email protected] Roll Flutter Engine from 00bef00f64a7 to 4f86a05ac932 (5 revisions) (flutter/flutter#124841) 2023-04-14 [email protected] Roll Flutter Engine from ad222b0c93b9 to 00bef00f64a7 (1 revision) (flutter/flutter#124837) 2023-04-14 [email protected] [flutter_tools] Reorganize android_studio_test.dart (flutter/flutter#124834) 2023-04-14 [email protected] Roll Flutter Engine from ce7be0093399 to ad222b0c93b9 (1 revision) (flutter/flutter#124832) 2023-04-14 [email protected] Remove Finder extended attributes in build target before code signing iOS frameworks (flutter/flutter#123896) 2023-04-14 [email protected] flutter-tool, web: update HTML template serviceWorkerVersion to be const (flutter/flutter#124826) 2023-04-14 [email protected] Fix `CupertinoContextMenu` throws exception on route animation (flutter/flutter#124785) 2023-04-14 [email protected] flutter-tool: enum cleanup (flutter/flutter#124760) 2023-04-14 [email protected] Roll Flutter Engine from 1289f4b513ef to ce7be0093399 (1 revision) (flutter/flutter#124825) 2023-04-13 49699333+dependabot[bot]@users.noreply.github.com Bump actions/checkout from 3.5.1 to 3.5.2 (flutter/flutter#124822) 2023-04-13 [email protected] Roll Flutter Engine from 2ff14d733daa to 1289f4b513ef (2 revisions) (flutter/flutter#124824) 2023-04-13 [email protected] Roll Flutter Engine from eb3e7d52ebbc to 2ff14d733daa (1 revision) (flutter/flutter#124820) 2023-04-13 [email protected] i123643 print java version gradle (flutter/flutter#123644) 2023-04-13 [email protected] Roll Flutter Engine from 496543715bdb to eb3e7d52ebbc (3 revisions) (flutter/flutter#124816) 2023-04-13 [email protected] Roll pub packages (flutter/flutter#124709) 2023-04-13 [email protected] [flutter_tools] Disable flaky `output_web_test` test case (flutter/flutter#124257) 2023-04-13 [email protected] Roll Flutter Engine from 26eddb64e8ea to 496543715bdb (1 revision) (flutter/flutter#124812) 2023-04-13 [email protected] Refactor `SliverAppBar.medium` & `SliverAppBar.large` to fix several issues (flutter/flutter#122542) 2023-04-13 [email protected] Improve the docs around the TextSelectionHandleControls deprecations (flutter/flutter#123827) 2023-04-13 [email protected] Roll Packages from fe5615f to d01f4ea (5 revisions) (flutter/flutter#124795) 2023-04-13 [email protected] Roll Flutter Engine from 81a57d24e62a to 26eddb64e8ea (1 revision) (flutter/flutter#124794) If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/flutter-packages Please CC [email protected],[email protected],[email protected] on the revert to ensure that a human is aware of the problem. To file a bug in Packages: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
The details here are largely borrowed from the Flutter repo, and in particular the subtleties most recently added there: flutter/flutter#122758 This config does the job in my testing. Note that it doesn't affect any of the things the editor does to simply augment your typing: adding indentation when you hit enter, adding a close-paren when you type an open-parent, and so on. Those are perfectly fine -- most of all because they only affect the code you actually intended to edit, but also because they generally get things right -- and continue operating as usual. Fixes: zulip#229
The details here are largely borrowed from the Flutter repo, and in particular the subtleties most recently added there: flutter/flutter#122758 This config does the job in my testing. Note that it doesn't affect any of the things the editor does to simply augment your typing: adding indentation when you hit enter, adding a close-paren when you type an open-parent, and so on. Those are perfectly fine -- most of all because they only affect the code you actually intended to edit, but also because they generally get things right -- and continue operating as usual. Fixes: #229
If someone's user settings include the following, the current workspace level formatting settings don't apply since they aren't as specific.
This PR handles this by turning off auto-formatting specifically for Dart files.
This PR also adds
"files.trimTrailingWhitespace": trueto simplify contribution guide.Fixes #122050. This change is test-exempt.
Pre-launch Checklist
///).