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

SQL errors are not cleared out upon save #100

Open
martinfr87 opened this issue Nov 19, 2022 · 1 comment
Open

SQL errors are not cleared out upon save #100

martinfr87 opened this issue Nov 19, 2022 · 1 comment

Comments

@martinfr87
Copy link

Using Visual Studio Code 1.73.1

Using

  • enableDBIntegration = true
  • dbDriver = mysql
  • lintSQLFiles = true

Create an .sql file in VS Code, enter a invalid SQL select query and hit Ctrl+S: the plugin warns about an SQL error.
So far so good.

Now, correct the SQL error and hit Ctrl+S again: the red underline does not go away and the error stays.
Close the .sql file and open it back: the error has disappeared.

The extension always seems to display the latest error even when the SQL syntax indeed is valid.

@akd-io
Copy link

akd-io commented Aug 16, 2023

I'm facing the same problem.

For example when doing:

    Prisma.sql`--sql
-     DELETE FROM "User";
+     SELECT * FROM "User";
    `,
Screenshot 2023-08-16 at 15 31 24

As an annoying workaround I do:

  1. Delete last letter of --sql
    -  --sql
    +  --sq
  2. Save file
  3. Re-add last letter of --sql
    -  --sq
    +  --sql
  4. Save file

Would be really nice to see this fixed. This linting is super nice to have.

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