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 login
from CLI.
Fixed
- Error shown when starting VS Code without a
.sourcery.yaml
file present. - File-level skip comments are now respected for custom rules
- Prevent
invert-any-all
from 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_*.py
and*_test.py
instead of the test - In the CLI, Sourcery will search for a
.sourcery.yaml
file in the current directory or any of its ancestors, rather than just the current directory. - Make
.sourcery.yaml
match paths relative to the config file. This applies toignore
,rules.paths.include
andrules.paths.exclude