top-level lint options grouped under [tool.ruff.lint] #9406
-
Hi everybody, If I correctly understood, according to #8449:
This said, I'm probably misunderstanding what is meant for top-level lint options. I was supposing them to be the ones listed in https://docs.astral.sh/ruff/settings/#top-level, but the following
makes
while moving So, wrapping up, I'm wondering whether someone could shed some light on what top level lint options are. Perhaps [ Hope the doubt has some sense, I'm still a beginner! |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
Hi! Glad to see you're using Ruff :) I think most of the confusion is that we have some future plans that aren't covered in the documentation. For example, We expect some options to remain at the top-level as well as at the lint level, such as file selection options (e.g. I hope this helps! Feel free to ask more questions. There should be deprecation warnings for anything that's changing before it breaks. We're a fast moving young project so I don't expect there to be any perfectly future-proof configuration. |
Beta Was this translation helpful? Give feedback.
-
Yeah, the docs aren't up-to-date on this unfortunately -- we're working on it! It's very reasonable to just keep putting everything in the top-level (under If you're looking for guidance, though, you can put everything under So |
Beta Was this translation helpful? Give feedback.
Hi! Glad to see you're using Ruff :)
I think most of the confusion is that we have some future plans that aren't covered in the documentation. For example,
show-source
is an option for theruff check
command which is not quite specific to the linter (see #8232). Additionally, we're planning on removing that options entirely in the future (see #4189). So there are a couple reasons that option wasn't moved.We expect some options to remain at the top-level as well as at the lint level, such as file selection options (e.g.
include
) or options that apply to both the linter and formatter (e.g.line_length
).I hope this helps! Feel free to ask more questions. There should be deprecation warning…