Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ruff-specific array-like settings can be unintuitive when set in the extension #491

Open
snowsignal opened this issue Jun 5, 2024 · 0 comments
Labels
configuration Related to settings and configuration

Comments

@snowsignal
Copy link
Contributor

Ruff version: v0.4.8
Extension version: 2024.26.0

Let's say you have a Lint > Select setting that looks like this:

Screenshot 2024-06-05 at 4 21 32 PM

which is equivalent to:

[tool.ruff.lint]
select = []

Notably, this is different from the default Lint > Select setting, which is this:

Screenshot 2024-06-05 at 4 21 47 PM

which leaves select without a value, instead of setting it to [].

This subtle difference means that if you remove all entries from Lint > Select but then forget to 'reset' the setting, you've turned off all lint rules, and may not have even realized it.

Ideally, the difference between null and [] for select and other "array-like" settings should be more clear.

@snowsignal snowsignal added the bug Something isn't working label Jun 5, 2024
@snowsignal snowsignal self-assigned this Jun 5, 2024
@snowsignal snowsignal removed the bug Something isn't working label Jun 5, 2024
@snowsignal snowsignal changed the title Ruff-specific array-like settings can be non-intuitive when set in the extension Ruff-specific array-like settings can be unintuitive when set in the extension Jun 5, 2024
@dhruvmanila dhruvmanila added the configuration Related to settings and configuration label Jul 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
configuration Related to settings and configuration
Projects
None yet
Development

No branches or pull requests

2 participants