Closed pokey closed 4 months ago
Describe the bug When I run sql-formatter from CLI I get a different format from the VSCode extension
To Reproduce Steps to reproduce the behavior:
Create the following file in test.sql:
test.sql
CREATE TABLE IF NOT EXISTS log (data TEXT NOT NULL) STRICT;
Run the Format Document VSCode command. Note that it will change the file to:
Format Document
Run the formatter from the CLI:
npm exec sql-formatter -- --fix test.sql
Note that it has changed back to the original format
Expected behavior I would expect consistent behaviour
Screenshots N/A
Usage
SQL
Additional context Add any other context about the problem here.
Extension version: 1.6.0 VS Code version: Code 1.91.1 (f1e16e1e6214d7c44d078b1f0607b2388f29d729, 2024-07-09T22:07:46.768Z) OS version: Darwin arm64 23.3.0 Modes:
sql-formatter npm version for CLI: 15.3.2
sql-formatter
Guessing from the version number 1.6.0, you seem to be using the Prettier SQL VSCode extension. There's nothing I can do about this.
Please read the FAQ.
yep that was it thank you!
Describe the bug When I run sql-formatter from CLI I get a different format from the VSCode extension
To Reproduce Steps to reproduce the behavior:
Create the following file in
test.sql
:Run the
Format Document
VSCode command. Note that it will change the file to:Run the formatter from the CLI:
Note that it has changed back to the original format
Expected behavior I would expect consistent behaviour
Screenshots N/A
Usage
SQL
at the bottom rightAdditional context Add any other context about the problem here.
Extension version: 1.6.0 VS Code version: Code 1.91.1 (f1e16e1e6214d7c44d078b1f0607b2388f29d729, 2024-07-09T22:07:46.768Z) OS version: Darwin arm64 23.3.0 Modes:
System Info
|Item|Value| |---|---| |CPUs|Apple M2 Max (12 x 2400)| |GPU Status|2d_canvas: enabledcanvas_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)|3, 3, 3| |Memory (System)|32.00GB (0.22GB free)| |Process Argv|--crash-reporter-id 0612ff11-8268-45d4-8d18-fe6461af3cbc| |Screen Reader|no| |VM|0%|
A/B Experiments
``` vsliv368cf:30146710 vspor879:30202332 vspor708:30202333 vspor363:30204092 vscod805cf:30301675 binariesv615:30325510 vsaa593:30376534 py29gd2263:31024239 c4g48928:30535728 azure-dev_surveyone:30548225 962ge761:30959799 pythongtdpath:30769146 welcomedialog:30910333 pythonnoceb:30805159 asynctok:30898717 pythonregdiag2:30936856 pythonmypyd1:30879173 h48ei257:31000450 pythontbext0:30879054 accentitlementsc:30995553 dsvsc016:30899300 dsvsc017:30899301 dsvsc018:30899302 cppperfnew:31000557 dsvsc020:30976470 pythonait:31006305 dsvsc021:30996838 945dj816:31013170 pythoncenvpt:31062603 a69g1124:31058053 dvdeprecation:31068756 dwnewjupytercf:31046870 impr_priority:31094925 refactort:31098051 1iic9185:31097392 ```sql-formatter
npm version for CLI: 15.3.2