ruff
ruff copied to clipboard
Allow default configuration for integrators
I am integrating with Ruff and wish to provide out-of-the-box configuration that users can override if they wish. Essentially, a flag to set the extend option like --config-extend would be perfect.
My use case is a new fmt command for Hatch but I imagine others would wish to integrate in a similar way, like Visual Studio Code.
Would this be easy to implement?
I'm not sure about the implementation complexity and I see your use case. A related issue is that larger projects want to share some configuration across projects that may be stored in different git repositories. I started looking into this in March but have since then be busy implementing the formatter. The main idea is that you can specify a named configuration (git URL / python package name / or something else) in extend. I believe that could solve your use case too:
- No user configuration: Pass the default configuration
- A user configuration exists: The user should extend your base configuration
@ofek Does https://github.com/astral-sh/ruff/pull/9599 solve your issue?
Thanks for the heads up! Unfortunately it does not work: https://github.com/astral-sh/ruff/issues/10035