ruff server: Support a custom TOML configuration file#11140
Merged
snowsignal merged 3 commits intomainfrom Apr 26, 2024
Merged
Conversation
ruff server supports a custom TOML configuration fileruff server: support a custom TOML configuration file
ruff server: support a custom TOML configuration fileruff server: Support a custom TOML configuration file
snowsignal
commented
Apr 25, 2024
dc86642 to
39f1905
Compare
Contributor
|
Contributor
|
In the absence of a project configuration for ruff, will the LS load the seetings from |
Member
|
It should yes -- not sure if it does yet though @snowsignal? |
Contributor
Author
|
@GaetanLepage @charliermarsh I actually don't think we do this, yet - I've filed an issue to support this. |
39f1905 to
a266d05
Compare
3a1c00b to
1e944ec
Compare
charliermarsh
approved these changes
Apr 26, 2024
Member
charliermarsh
left a comment
There was a problem hiding this comment.
I have one suggestion to simplify the implementation and semantics.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Closes #10985.
The server now supports a custom TOML configuration file as a client setting. The setting must be an absolute path to a file. If the file is called
pyproject.toml, the server will attempt to parse it as a pyproject file - otherwise, it will attempt to parse it as aruff.tomlfile, even if the file has a name besidesruff.toml.If an option is set in both the custom TOML configuration file and in the client settings directly, the latter will be used.
Test Plan
ruff.tomlfile outside of the workspace you are testing. Set an option that is different from the one in the configuration for your test workspace.