Consider unsafe-fixes settings for code actions
#15666
Conversation
|
| directory.to_path_buf(), | ||
| Arc::new(RuffSettings { | ||
| path: Some(pyproject), | ||
| unsafe_fixes: settings.unsafe_fixes, |
There was a problem hiding this comment.
Do you remember what's the reason for only storing parts of the settings instead of the entire settings struct with accessors for the linter/formatter settings?
There was a problem hiding this comment.
I think it started out with just having LinterSettings and FormatterSettings (#10950) but later on we realized (via bug reports) that exclusions weren't being considered by the server which led to adding the FileResolverSettings (#11551).
It makes me wonder if we should simply store the entire
Settingsstruct inRuffSettings. It seems like we eventually will need all of them anyway?
Yeah, I agree. I can do that as a follow-up.
There was a problem hiding this comment.
Thanks. This looks good. It makes me wonder if we should simply store the entire Settings struct in RuffSettings. It seems like we eventually will need all of them anyway?
Summary
Closes: #13960
Test Plan
Using the example from astral-sh/ruff-vscode#672:
Screen.Recording.2025-01-22.at.11.27.23.AM.mov