-
-
Notifications
You must be signed in to change notification settings - Fork 873
Closed
Labels
bugSomething isn't workingSomething isn't working
Description
Search before asking
- I searched the issues and found no similar issues.
What Happened
When using the Python API Linter()
class, if both config
and exclude_rules
are set (where the config
is a FluffConfig
and not a dict
), means that the latter is ignored.
Expected Behaviour
Either something helpful on an exception.
Observed Behaviour
The exclude_rules
is silently ignored. The is because the __init__()
method for the Linter
class ends early if a config
is provided - and not built to expect that both might be provided.
How to reproduce
linter = Linter(config=config, exclude_rules=exclude_rules_from_config)
result = linter.lint_string(in_str=sql_query, fix=True)
Dialect
bigquery
- but I can see that this is an issue with all dialects.
Version
2.2.0
Configuration
default config
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
- I agree to follow this project's Code of Conduct
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working