Rules can now be tagged by adding a tags key. Then you can include these tags from the CLI to choose a subset of rules to run.
This makes it easy to specify which rules you want to run in CI. First add a tag to the rules you want:
- id: important-rule
Then run the
ci tag with
sourcery review --include ci .
It is now much easier to configure Sourcery to run in pre-commit or CI. Run:
sourcery init pre-commit
sourcery init ci
skip config and
CLI options. Sourcery's built-in rules carry the
sourcery init command in CLI - you can now use it to add
pre-commit config, as well as view instructions to add Sourcery to CI.