question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Show warning if user has set `files.trimTrailingWhitespace` globally

See original GitHub issue

If the user defined files.trimTrailingWhitespace as true in the VSCode settings, we cannot prevent trimming the whitespaces if the user set trim_trailing_whitespace = false in his .editorconfig file. That’s why we should show a warning message if the global setting overrides the .editorconfig setting.

Possible candidates

The currently opened folder contains workspace settings that may override EditorConfig settings.

Workspace settings may be overriding EditorConfig settings. It is recommended that you remove the workspace settings in favor of EditorConfig.

The currently opened file contains workspace settings that may override EditorConfig settings.

The files.trimTrailingWhitespace workspace setting may be overriding the EditorConfig trim_trailing_whitespace setting for this file. It is recommended that you remove workspace settings that might override EditorConfig settings.

I think we should keep the message small and clear. The last one is too long and won’t fit into the popup box I’m afraid. Although we can make it a little shorter and use something like this

The files.trimTrailingWhitespace workspace setting is overriding the EditorConfig trim_trailing_whitespace setting for this file.

It’s up to the user to decide what they want to do in that case.

Issue Analytics

  • State:closed
  • Created 8 years ago
  • Comments:44 (12 by maintainers)

github_iconTop GitHub Comments

5reactions
dennisreimanncommented, Jan 3, 2017

Is there a way to deactivate this warning? I like to see it once, but it gets annoying pretty quickly as it comes up on every succeeding save.

2reactions
sarbbottamcommented, Apr 8, 2016

@jedmao closed this in #43 16 minutes ago

Thanks! 👏

Read more comments on GitHub >

github_iconTop Results From Across the Web

Remove trailing spaces automatically or with a shortcut
This will open a document. Add a new "files.trimTrailingWhitespace": true setting to the User Settings document if it's not already there. This is...
Read more >
User and Workspace Settings - Visual Studio Code
A setting shows up under this filter if its value differs from the default value, or if its value is explicitly set in...
Read more >
Configuration files for code analysis rules - .NET
If the global_level values for the configuration files with conflicting entries are equal, a compiler warning is reported and both entries are ...
Read more >
vscode editorconfig not working - You.com | The search engine you ...
Add a new "files.trimTrailingWhitespace": true setting to the User Settings document if it's not already there. This is so you aren't editing the...
Read more >
VS Code Settings, Power User Tips, and Misc Notes
If you notice that every time you open a file with this method, ... or remove the setting that code.exe always run with...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found