sqlfluff icon indicating copy to clipboard operation
sqlfluff copied to clipboard

Linting rules for bind variables

Open sandnose opened this issue 2 years ago • 3 comments

Search before asking

  • [X] I searched the issues and found no similar issues.

Description

This migh seem small but im missing a ruleset for bind variables. I am using bind variables quite heavily so that i can run my sql queries and pass variables through oracledb thinclient. As of now the linter turns a = :my_variable into a =: my_variable

Dont get me wrong, everything still works. Its just a matter of preference, so if possible i would like a ruleset that can specify that colons belonging to a bind variable should be touching the name.

Use case

i would like a ruleset that can specify that colons belonging to a bind variable should be touching the name.

Dialect

Oracle

Are you willing to work on and submit a PR to address the issue?

  • [ ] Yes I am willing to submit a PR!

Code of Conduct

sandnose avatar Mar 19 '24 20:03 sandnose

I second this for MySQL, as my company's repo uses these heavily, especially in conjunction with sqlalchemy/pandas

Xemptuous avatar Apr 19 '24 05:04 Xemptuous