microsoft / vscode-docker

Docker Extension for Visual Studio Code
https://marketplace.visualstudio.com/items?itemName=ms-azuretools.vscode-docker
Other
1.18k stars 508 forks source link

Dockerfile is reformatted even when formatting is disabled #4257

Closed mendezj-eikontx closed 3 months ago

mendezj-eikontx commented 4 months ago

Type: Bug

In VSCode Settings->User->Text Editor->Formatting, Format On Save is disabled, but the Docker extension reformats my Dockerfiles when I save.

Extension version: 1.29.0 VS Code version: Code 1.87.0 (019f4d1419fbc8219a181fab7892ebccf7ee29a2, 2024-02-27T23:42:51.279Z) OS version: Darwin arm64 23.3.0 Modes: Connection to 'ssh-remote+engit-compute3' could not be established

System Info |Item|Value| |---|---| |CPUs|Apple M1 Pro (10 x 24)| |GPU Status|2d_canvas: enabled
canvas_oop_rasterization: enabled_on
direct_rendering_display_compositor: disabled_off_ok
gpu_compositing: enabled
multiple_raster_threads: enabled_on
opengl: enabled_on
rasterization: enabled
raw_draw: disabled_off_ok
skia_graphite: disabled_off
video_decode: enabled
video_encode: enabled
webgl: enabled
webgl2: enabled
webgpu: enabled| |Load (avg)|4, 2, 3| |Memory (System)|32.00GB (0.77GB free)| |Process Argv|.bashrc --crash-reporter-id d4e53ad9-2a3f-4dfd-ae13-12bdc071ac2f| |Screen Reader|no| |VM|0%| Connection to 'ssh-remote+engit-compute3' could not be established
A/B Experiments ``` vsliv368cf:30146710 vspor879:30202332 vspor708:30202333 vspor363:30204092 vscod805cf:30301675 binariesv615:30325510 vsaa593:30376534 py29gd2263:30899288 vscaat:30438848 c4g48928:30535728 azure-dev_surveyone:30548225 962ge761:30959799 pythongtdpath:30769146 welcomedialogc:30910334 pythonidxpt:30866567 pythonnoceb:30805159 asynctok:30898717 pythontestfixt:30902429 pythonregdiag2:30936856 pyreplss1:30897532 pythonmypyd1:30879173 pythoncet0:30885854 pythontbext0:30879054 dsvsc016:30899300 dsvsc017:30899301 dsvsc018:30899302 cppperfcontrol:30979541 d34g3935:30971562 a89i1917:30973842 bg6jg535:30979843 dsvsc020:30976470 ```
bwateratmsft commented 3 months ago

Do you have a workspace setting that overrides the user setting, to enable formatting on save? Workspace settings are in .vscode/settings.json in your source repository.

mendezj-eikontx commented 3 months ago

Do you have a workspace setting that overrides the user setting, to enable formatting on save? Workspace settings are in .vscode/settings.json in your source repository.

No, there is no .vscode/settings.json in the repository.

bwateratmsft commented 3 months ago

Do you have any other Docker-related extensions installed? I'm not able to reproduce.

Does it show "Modified elsewhere" next to the setting--if so what does it show when hovering over that?

image

mendezj-eikontx commented 3 months ago

It says Modified in Workspace, and when I click on Workspace, it shows Format On Save is enabled. I looked again, and there is a .vscode/settings.json in the repo. I was looking at a different repo earlier (sorry for the confusion!).

bwateratmsft commented 3 months ago

No worries!