Skip to content
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

Formatting [dotenv] against my explicit consent #201587

Closed
flexchar opened this issue Dec 28, 2023 · 1 comment
Closed

Formatting [dotenv] against my explicit consent #201587

flexchar opened this issue Dec 28, 2023 · 1 comment

Comments

@flexchar
Copy link

Does this issue occur when all extensions are disabled?: Yes/No

Version: 1.85.1
Commit: 0ee08df
Date: 2023-12-13T09:48:16.874Z
Electron: 25.9.7
ElectronBuildId: 25551756
Chromium: 114.0.5735.289
Node.js: 18.15.0
V8: 11.4.183.29-electron.0
OS: Darwin arm64 23.2.0

Steps to Reproduce:

  1. Open .env file and save.
  2. It will get formatted if defaultFormatter is set, or show a pop asking to configure one.

GUI Example:

  • getting a popup if I hide default formatter in the settings as such
"[dotenv]": {
    // "editor.defaultFormatter": "foxundermoon.shell-format",
    "editor.formatOnSave": false,
    "editor.codeActionsOnSave": {
        "source.fixAll": false,
        "formatOnSave": false
    }
}

image

  • file gets formatted against my explicit consent stating "editor.formatOnSave": false when settings are
 "[dotenv]": {
    "editor.defaultFormatter": "foxundermoon.shell-format",
    "editor.formatOnSave": false,
    "editor.codeActionsOnSave": {
        "source.fixAll": false,
        "formatOnSave": false
    }
}

I observe the same behaviour with editor.formatOnSave set to false globally.

@flexchar
Copy link
Author

Actually thanks to writing this issue, I discovered I was wrong.

It is the issue of the shell formatter extension, which slipped through because file type is "dot env".

Related:

@microsoft microsoft locked and limited conversation to collaborators Jun 10, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant