quarylabs / sqruff

Fast SQL formatter/linter
https://quary.dev/
Apache License 2.0
163 stars 4 forks source link

Getting Error "not implemented" when running sqruff lint #331

Open ikhudur opened 2 months ago

ikhudur commented 2 months ago

Hello,

I have just installed sqruff by following the README.md file https://github.com/quarylabs/sqruff/blob/c2850ab65f350932612a1cd5c5d89d255f3da81f/README.md#linux

When I run sqruff lint I get the following error:

thread 'main' panicked at crates/lib/src/core/config.rs:471:25: not implemented note: run with 'RUST_BACKTRACE=1' environment variable to display a backtrace

Could you please help me with this?

More info: I use WSL2 I do not have Rust installed

Best regards, Ivan

gvozdvmozgu commented 2 months ago

What sqlfluff config do you use?

ikhudur commented 2 months ago

My apologise, what do you mean by what config I am using?

gvozdvmozgu commented 2 months ago

Do you have a .sqlfluff file?

ikhudur commented 2 months ago

Yes, the .sqlfluff looks like this:

[sqlfluff]
dialect = databricks
templater = dbt
rules = all
exclude_rules = ST06
max_line_length = 150

[sqlfluff:templater:jinja]
apply_dbt_builtins = True

[sqlfluff:templater:dbt]
project_dir = ./
profiles_dir = .
profile = db
target = dev

[sqlfluff:rules]
allow_scalar = True
single_table_references = consistent
unquoted_identifiers_policy = all

[sqlfluff:rules:capitalisation.keywords]
capitalisation_policy = upper

[sqlfluff:rules:capitalisation.types]
extended_capitalisation_policy = upper

[sqlfluff:rules:capitalisation.identifiers]
extended_capitalisation_policy = lower

[sqlfluff:rules:capitalisation.functions]
extended_capitalisation_policy = upper

[sqlfluff:rules:capitalisation.literals]
extended_capitalisation_policy = upper

[sqlfluff:rules:convention.count_rows]
prefer_count_1 = True
louisjoecodes commented 2 months ago

Hey @ikhudur, unfortunately sqruff doesn't support dbt. Definitely might be worth checking out what we are building over at https://github.com/quarylabs/quary 😊

We're happy to consider adding dbt support in the future - feel free to reach out if you want to contribute.

alxsbn commented 1 month ago

@louisjoecodes It's a must have I think :)