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

SQLFluff Formatting Failed. #109

Open
skaylie opened this issue Aug 16, 2023 · 1 comment
Open

SQLFluff Formatting Failed. #109

skaylie opened this issue Aug 16, 2023 · 1 comment

Comments

@skaylie
Copy link

skaylie commented Aug 16, 2023

hi @RobertOstermann,

my dev environment got wiped out and i'm having difficulty getting vscode sqlfluff to work again. ugh. :headbang:

i think i've gotten past getting my executable path set up properly, but now when i try to format a document a blue dash flits across the top of the editor window and an error pops up that just says "SQLFluff Formatting Failed." and no further explanation. none of the dynamic functionality is working either. how can i tell why the formatting is failing? i don't see "SQLFluff Debug Extension" anymore, so i can't really get any clues as to what's going wrong.

scott

@RobertOstermann
Copy link
Contributor

oof thats unfortunate. Checking the SQLFluff output channel is usually the easiest place to see why something is failing.

As for SQLFluff Debug not showing anymore, that is a mistake by me. I should have that showing for all the sqlfluff.format.languages values, but I mistakenly only am enabling it when the language setting has context menu items showing. Not sure when I will push another release to fix that, for now setting up your sqlfluff.format.languages like this should do the trick.

{
  "sqlfluff.format.languages": [
    {
      "language": "sql",
      "preserveLeadingWhitespace": false,
      // Enables SQLFLuff Debug command for this language
      "contextMenuFormatOptions": true
    },
    "sql-bigquery",
    "jinja-sql",
    "postgres",
    "snowflake-sql"
  ],
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants