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

Unable to lint non .sql files #137

Open
Enduriel opened this issue May 19, 2024 · 1 comment
Open

Unable to lint non .sql files #137

Enduriel opened this issue May 19, 2024 · 1 comment

Comments

@Enduriel
Copy link

My sqlfluff version is v3.0.2
System info:

Version: 1.89.1 (system setup)
Commit: dc96b837cf6bb4af9cd736aa3af08cf8279f7685
Date: 2024-05-07T05:13:33.891Z
Electron: 28.2.8
ElectronBuildId: 27744544
Chromium: 120.0.6099.291
Node.js: 18.18.2
V8: 12.0.267.19-electron.0
OS: Windows_NT x64 10.0.22631

I'm not able to lint sql files with extensions other than .sql, they seem to be complete ignored by the extension, this is especially strange because the formatter still works and runs correctly. I have tested this with .postgres and .sqlite3 file extensions.

This is a snippet of my settings.json

    "sqlfluff.linter.languages": [
        "sql",
        "sqlite",
        "sqlite3",
        "sql-bigquery",
        "jinja-sql",
        "postgres",
        "snowflake-sql"
    ],
    "files.associations": {
        "*.sqlite3": "sqlite"
    },
    "sqlfluff.format.languages": [
        "sql",
        "sqlite",
        "sqlite3",
        "sql-bigquery",
        "jinja-sql",
        "postgres",
        "snowflake-sql"
    ],

As I said, the formatter options work and format my files, additionally if I rename the files to .sql they work fine, but any other of the specified languages doesn't work, this is even though I have the correct file -> language associations set up.

@keraion
Copy link
Contributor

keraion commented May 23, 2024

Let's focus on one language first. Which extension are you using for the postgres language? Is it ckolkman.vscode-postgres? If so, does it work with .pgsql or .psql files?

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