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

Lint embedded queries #160

Open
musjj opened this issue Oct 4, 2024 · 3 comments
Open

Lint embedded queries #160

musjj opened this issue Oct 4, 2024 · 3 comments

Comments

@musjj
Copy link

musjj commented Oct 4, 2024

It would be nice if you can lint/auto-fix query strings embedded in other languages.

For example, in Rust:

sqlx::query("SELECT * FROM users WHERE email = ?")

Or in Go:

db.QueryRow("SELECT (quantity >= ?) from album where id = ?")
@RobertOstermann
Copy link
Contributor

Seems like a request for the actual sqlfluff repo. Or does the command line tool already allow this? This repo just handles the extension.

@musjj
Copy link
Author

musjj commented Oct 5, 2024

I was thinking of making the issue on the main repo, but it looks like that the maintainer thinks that it should be implemented by other tools:

I think it'd be more appropriate to look at implementing this as a separate package that uses SQLFluff.

So I thought that maybe the vscode plugin would be appropriate place for this, though I do agree that implementing it in sqlfluff itself would be the most ideal.

The issue is from 2022, so not sure if the maintainers have changed their minds since then.

@RobertOstermann
Copy link
Contributor

Ok, this is probably not something I would fix. If you want to create a PR for it I would look it over and help get it merged and published.

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