Skip to content

Add TOML examples to --config help text#25013

Merged
ntBre merged 3 commits into
astral-sh:mainfrom
darestack:docs/config-help-example
May 12, 2026
Merged

Add TOML examples to --config help text#25013
ntBre merged 3 commits into
astral-sh:mainfrom
darestack:docs/config-help-example

Conversation

@darestack
Copy link
Copy Markdown
Contributor

@darestack darestack commented May 6, 2026

This PR adds TOML examples to the --config help text to clarify that it accepts both file paths and inline key-value pairs.

@astral-sh-bot astral-sh-bot Bot requested a review from ntBre May 6, 2026 13:56
@ntBre ntBre linked an issue May 6, 2026 that may be closed by this pull request
@ntBre ntBre added documentation Improvements or additions to documentation cli Related to the command-line interface labels May 6, 2026
@astral-sh-bot
Copy link
Copy Markdown

astral-sh-bot Bot commented May 6, 2026

ruff-ecosystem results

Linter (stable)

✅ ecosystem check detected no linter changes.

Linter (preview)

✅ ecosystem check detected no linter changes.

Copy link
Copy Markdown
Contributor

@ntBre ntBre left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, this looks reasonable to me overall, I just had one nit about a newline. Would you mind updating your test plan to include screenshots of the CLI help output and the generated documentation?

I'm also curious about this part of the summary:

This is a follow-up to improvements in how configuration overrides are handled.

Which PR is this a follow-up to?

Maybe I'm off base here, but this seems like the kind of mistake that an LLM could make. Please make sure to follow our AI Policy.

Comment thread crates/ruff/src/args.rs Outdated
/// Overrides of individual settings using this option always take precedence
/// over all configuration files, including configuration files that were also
/// specified using `--config`.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we need this blank line?

Suggested change

Copy link
Copy Markdown
Contributor Author

@darestack darestack May 9, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we need this blank line?

Thanks for that. I have removed it.

I also checked the CLI help and generated docs:

  • cargo dev generate-cli-help
  • target/debug/ruff --help
  • sed -n '548,566p' docs/configuration.md
  • git diff --exit-code

The help output and generated docs both show the new --config examples, and git diff --exit-code shows no extra changes after regenerating the docs.

Evidence:
Screenshot from 2026-05-09 09-55-17
Screenshot from 2026-05-09 09-55-34

@darestack darestack closed this May 9, 2026
@darestack darestack reopened this May 9, 2026
@astral-sh-bot astral-sh-bot Bot requested a review from ntBre May 9, 2026 09:10
Copy link
Copy Markdown
Contributor

@ntBre ntBre left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@ntBre ntBre changed the title [docs] Add TOML examples to --config help text Add TOML examples to --config help text May 12, 2026
@ntBre ntBre merged commit 85705f1 into astral-sh:main May 12, 2026
44 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cli Related to the command-line interface documentation Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

ruff check --config help is difficult to understand

2 participants