fix: validate default rules path only when used - #945
Closed
qinfenyinluo wants to merge 1 commit into
Closed
qinfenyinluo wants to merge 1 commit into
qinfenyinluo wants to merge 1 commit into
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #945 +/- ##
=======================================
Coverage 78.89% 78.89%
=======================================
Files 81 81
Lines 7131 7131
=======================================
Hits 5626 5626
Misses 1505 1505
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Author
|
Closing this as duplicate after noticing that #937 already covers the same issue. Sorry for the extra noise, and thanks for maintaining Quark. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
--ruleto be parsed even when the default rules directory has not been downloaded yet.Root cause
--ruleusedclick.Path(exists=True)together with the default rules directory. Click validated that default during argument parsing, so commands that supplied their own rule file via--summary custom_rule.jsoncould fail before Quark reached the code path that uses the custom rule.Validation
python -m pytest tests\test_cli.py -q-> 2 passedpython -m black --check tests\test_cli.py-> passedgit diff --cached --check-> passed before commitI also tried
python -m pytest tests\test_cli.py tests\test_freshquark.py -q. The new CLI tests passed, but the existingtests/test_freshquark.pyassertions fail on Windows because expected paths use\while the mocked command builds paths with/; this appears unrelated to this change.Closes #936