ruff icon indicating copy to clipboard operation
ruff copied to clipboard

Rework linter API to remove a `Clone` implementation on `LinterSettings`

Open snowsignal opened this issue 10 months ago • 0 comments

In https://github.com/astral-sh/ruff/pull/10652, we had to implement Clone for LinterSettings and all sub-settings so that the source.organizeImports resolver could clone the settings from a reference and then modify rules to [I001, I002]. Since this cloning operation is wasteful (we only need to update one field), we should find a way to temporarily override values in LinterSettings without needing to clone the entire struct.

snowsignal avatar Apr 04 '24 22:04 snowsignal