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

Nothing is showing in VS code when we do 'Format Document' #119

Open
SebT84 opened this issue Dec 14, 2023 · 3 comments
Open

Nothing is showing in VS code when we do 'Format Document' #119

SebT84 opened this issue Dec 14, 2023 · 3 comments

Comments

@SebT84
Copy link

SebT84 commented Dec 14, 2023

System:

  • Windows 11
  • VS code
  • Python 3.12
  • Gitlab

Setup:
I've installed SQLfluff on VS code so I can format my code, this is set as part of a .sqlfluff file that is un a repo. The path to the .sqlfluff has been update in VS code File > Preferences > Settings > Extensions > SQLfluff under 'Specify an additional configuration file that overrides the standard configuration files.' .

Issue:
When doing right click 'format document' on some SQl view that we know don't have the right format, nothing happen. we would expect some issues to come up under the 'PROBLEMS' tab in vs code.
We've also tried to run it in the command line with sqlfluff lint create_view_V_SALE_NR.sql --dialect snowflake and it works.

@crh-hireup
Copy link

Have you checked with 'Format Document With...' SQL Fluff is selected?
image

@alesxp
Copy link

alesxp commented Aug 23, 2024

My project is working without any errors, but I get an error when trying to select the formatter:


Format triggered for ...../processing_dist_score_wtih_catalogue_items.sql

--------------------Executing Command--------------------

http://localhost:8581/format?sql_path=....../processing_dist_score_wtih_catalogue_items.sql



Unhealthy dbt project:


Raw DBT-Interface /format output:


{
"error": {
"code": 1,
"message": "Sqlfluff currently unavailable. Check that your project does not contain compilation errors.",
"data": {
"error": ""
}
}
}


@rsrinivasan-ST
Copy link

I'm facing the same issue on mac.

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

4 participants