-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
Add Trim Trailing Whitespace Preference #8742
Add Trim Trailing Whitespace Preference #8742
Conversation
Functionality and code are working for me 👌 One issue I did notice is that there doesn't seem to be an implementation for 'language-overridable' scope in |
3123124
to
8e8360b
Compare
@dukengn do you mind performing a review when you get a chance? I'll review as well. |
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 changes work very well, I confirmed that a language-specific preference also works well.
I was a bit confused as to why JS/TS
files do not respect the preference (they seem to be auto-formatted) but confirmed it is the same case in vscode
.
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 changes work well for me 👍 Can you please address Paul's comment?
Signed-off-by: Colin Grant <colin.grant@ericsson.com>
8e8360b
to
67df732
Compare
I think I've created a CQ for copying the preference specification from VSCode here: https://dev.eclipse.org/ipzilla/show_bug.cgi?id=22866 🤞 |
It works as described, but every time I save, I see the following error in the console:
|
@kittaakos I remember that the issue is already present on The fix might be to eventually do as Anton suggested here: #6520 (comment). |
The CQ has been triaged and this code may now be checked in. |
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.
@colin-grant-work the changes work well 👍
In the future it may be something we want to try to cover in the saveable.spec.js
api-tests along with formatOnSave
.
@colin-grant-work I believe the pull-request can be merged, thank you for the contribution :) |
Signed-off-by: Colin Grant colin.grant@ericsson.com
What it does
Fixes #8059 by adding a preference an and onWillSaveModel hook to perform the action.
How to test
files.trimTrailingWhitespace
totrue
in the scope of your white-spacey file (or higher scope).Since the preference name/description etc. are copied from VSCode, this is likely to require a CQ. I'll get started on that.
Review checklist
Reminder for reviewers