0.12.11: Review Only Changed Code
We continued improving the
Command Line Interface:
With the new --diff option, you can now run Sourcery only for the code in your
current PR.
sourcery review --diff "git diff main" .
We had an issue with the release 0.12.10 This changelog contains the changes of both 0.12.10 and 0.12.11
Added
- A JSON schema in the docs to enable IDE autocompletion of sourcery config files
- CLI:
Review only changed code
with
sourcery review --diff="git diff HEAD" . - CLI:
Load config paths or URLs
using
--config - Introduction tutorial in the documentation intended for first-timers
- Name condition
contains - Tip on next steps after running
sourcery loginfrom CLI.
Fixed
- Error shown when starting VS Code without a
.sourcery.yamlfile present. - File-level skip comments are now respected for custom rules
- Prevent
invert-any-allfrom inverting chains of comparisons like0 <= value <= 255. Fixes Issue # 286
Changed
- Improved some of the descriptions in the Google Python Style Guide rules.
- GPSG global variables rule: allow logger
- GPSG
non-test rules
exclude
test_*.pyand*_test.pyinstead of the test - In the CLI, Sourcery will search for a
.sourcery.yamlfile in the current directory or any of its ancestors, rather than just the current directory. - Make
.sourcery.yamlmatch paths relative to the config file. This applies toignore,rules.paths.includeandrules.paths.exclude