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

Option to disable sql-lint? #110

Open
jcalfee opened this issue May 10, 2023 · 4 comments
Open

Option to disable sql-lint? #110

jcalfee opened this issue May 10, 2023 · 4 comments

Comments

@jcalfee
Copy link

jcalfee commented May 10, 2023

Is there anyway to use just the syntax highlighting without sql-lint in VSCodium?

@jcalfee
Copy link
Author

jcalfee commented May 10, 2023

I think I found it. inlineSQL.lintSQLFiles .. I have pretty bad luck trying to set VSCode plugin JSON settings in general. I'm not sure how that works. I did find a button under Extension Settings / tooltip "Open Settings (JSON)" and I added "inlineSQL.lintSQLFiles": false, .. (shortcut to ~/.config/VSCodium/User/settings.json)

I get nice SQL highlighting but the entire SQL string is underscored with a red error squiggly:
image

This is what I do not need: [sql-lint: hungarian-notation] Hungarian notation present in query

I really see very little documentation about how or if these settings hot-reload or not. This time, I restarted the editor and it did seam to disable sql-lint: so syntax highlighting and that confusing error is gone!

However, I tried to narrow it down but now the sql-lint is back and I can't disable it. I'm wondering if it perhaps took a while to load and I thought it was disabled (you know, really no feedback to go on; i'm running blind).

Prior I tried to disable the hungarian-notation in .sql-lint.json .. so after restarting I don't know if that setting was just picked up (or was it not working all along) so I moved that file to a temp folder and restarted. The hungarian-notation error shows up again..

The entire time, the Extension Settings for User and Workspace have not had either "Enable linting .." checked.

The entire time, I had "inlineSQL.lintSQLFiles": false, in ~/.config/VSCodium/User/settings.json

[project_home]/.sql-lint.json

{
    "host": "localhost",
    "user": "root",
    "password": "password",
    "ignore-errors": [
        "hungarian-notation"
    ]
}

Now you see why I just want it off so I can get back to really enjoying your fantastic syntax highlighting! Thank you for this plugin, it will be nice to see VSCode improve how they handle these settings though.. Any tips are appreciated. This is pretty standard for me, I unfortunately have to give up on plugins over config issues.

@jcalfee
Copy link
Author

jcalfee commented May 10, 2023

This could be something VSCodium related. I'm trying to get some help here VSCodium/vscodium#1509 so I can install and debug this..

@jcalfee
Copy link
Author

jcalfee commented May 12, 2023

I found a work-around. Comment out these two lines:

~/.vscode-oss/extensions/qufiwefefwoyn.inline-sql-syntax-2.10.3-universal/out/extension.js

        // errors = await (0, sql_lint_1.default)({ sql: sqlStr });
        // log.appendLine(`${errors.length} errors found`);

The sql lint runs unless you have DB integration on:

    if (configuration.get('enableDBIntegration')) {
       // ...
    } else {
        errors = await (0, sql_lint_1.default)({ sql: sqlStr });
        log.appendLine(`${errors.length} errors found`);
    }

@mnowaczyk
Copy link

This is a huge pain, I start typing and the entire query flashes red due to trailing whitespace.

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