Move CLI docs to top-level section - #27017
Conversation
ntBre
left a comment
There was a problem hiding this comment.
Thanks, this looks good to me at a high level, but I think there are a few more things to do. First of all, there are some merge conflicts, I believe from #26803. We need to make sure not to drop the new argfile docs. We also need to check for references to configuration#... that no longer exist. Anything that links to a subsection of the CLI reference has to be updated.
I'm not sure how easy this will be, so it might be okay as-is for a first iteration, but I think ideally we would actually document what analyze graph does rather than the analyze subcommand itself. It kind of makes sense to me to separate that into its own PR and focus on splitting out the CLI help here first.
| # Command-line interface | ||
|
|
||
| Some configuration options can be provided or overridden via dedicated flags on the command line. | ||
| This includes those related to rule enablement and disablement, | ||
| file discovery, logging level, and more: | ||
|
|
||
| ```console | ||
| $ ruff check path/to/code/ --select F401 --select F403 --quiet | ||
| ``` | ||
|
|
||
| All other configuration options can be set via the command line | ||
| using the `--config` flag, detailed below. | ||
|
|
||
| ### The `--config` CLI flag |
There was a problem hiding this comment.
Now that Command-line interface is the top-level heading, I think these should become ## instead of ###.
Resolves #17020. The CLI docs were previously nested under 'Configuring Ruff', which was confusing. This PR moves the CLI docs to a top-level section 'Command-line Interface' by generating a separate
cli.mdfile.Also resolves #13444 by adding the
ruff analyzecommand to the generated CLI help.