Skip to content

[Bug]: Extension 'sqruff' is configured as formatter but it cannot format 'SQL'-files #2060

@sherif-virtasant

Description

@sherif-virtasant

What happened?

As the title says, The VS Code extension doesn't seem to be working

I Installed sqruff using homebrew

zsh ❯ which sqruff
/opt/homebrew/bin/sqruff

zsh ❯ /opt/homebrew/bin/sqruff --version
sqruff 0.29.3

I then copied my .sqlfluff to .sqruff and updated the configuration to replace sqlfluff occurrences with sqruff

I Finally updated the VS Code configuration as followed

  "[sql]": {
    "editor.defaultFormatter": "Quary.sqruff"
  },

When I attempt to format a .sql file I get the following error

Image

In VS Code's outputs for Sqruff LSP I see the following error

[Error - 5:36:29 PM] Stopping server failed
  Message: Cannot call write after a stream was destroyed
  Code: -32099 

Version

sqruff 0.29.3
VS Code extension 0.29.2

Checked in Playground

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions