-
-
Notifications
You must be signed in to change notification settings - Fork 661
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
CLI: Add --ignore-local-config flag #2061
Conversation
@barrywhart @tunetheweb this option allows for non-override behaviour when specifying the config via the CLI 👍 Looking to get this + the config simple API option finished before the next release |
Codecov Report
@@ Coverage Diff @@
## main #2061 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 148 148
Lines 10508 10510 +2
=========================================
+ Hits 10508 10510 +2
Continue to review full report at Codecov.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
Does seem a lot of repetition in these config changes. Wonder if there is any refactor possible to avoid having to make so many similar lines to so many places if this changes again in future? But outside of scope for this PR so happy to approve it.
@tunetheweb yeah it's definitely something to look into. Most of the lines in this and #1986 are because they're specifically to do with loading the config. Most other config changes should be fairly lightweight 😄 |
Brief summary of the change made
This is a follow up to #1986 (The code changes are near identical, just for a different flag).
This PR adds a
--ignore-local-config
flag to the CLI that serves 2 main purposes:--config
flag the user is able to use a custom config without the local config override behaviour.The idea was from a discussion with @tunetheweb when making the original PR.
![image](https://user-images.githubusercontent.com/80432516/144940976-69575c71-128b-4ea9-858d-c46bcb733da6.png)
Are there any other side effects of this change that we should be aware of?
No
Pull Request checklist
Please confirm you have completed any of the necessary steps below.
Included test cases to demonstrate any code changes, which may be one or more of the following:
.yml
rule test cases intest/fixtures/rules/std_rule_cases
..sql
/.yml
parser test cases intest/fixtures/dialects
(note YML files can be auto generated withpython test/generate_parse_fixture_yml.py
or by runningtox
locally).test/fixtures/linter/autofix
.Added appropriate documentation for the change.
Created GitHub issues for any relevant followup/future enhancements if appropriate.