sourcery-ai / sourcery

Instant AI code reviews
https://sourcery.ai
MIT License
1.54k stars 68 forks source link

Allow for more than one sourcery settings file #399

Open scottmc42 opened 11 months ago

scottmc42 commented 11 months ago

Checklist

Description

It would be helpful if we could have settings across multiple locations. For instance, I would put global settings in the ~/.config/sourcery/sourcery.yaml file. Then within a project have different (as is more fine-tune, or overwrite existing) settings.

For instance, the rule_settings > python_version would be globally to the system version of python. But with virtual environments, that value may or may not be correct.

I would also turn the coding_assistant off by default (some projects forbid generative AI) and only enable it in projects that would allow such things.

Currently, once the ~/.config/sourcery/sourcery.yaml file is read, it does not read the .sourcery.yaml from the top-level of a project so there is no way to have multiple configurations.