rust-lang / rust-lang/rustfmt

config printing enhancements

Open
#6,256 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

A-config C-enhancement SO-print-config
Dominant language
Rust
Stars
7k
Forks
1.1k
Avg merge
2d 13h
Merged PRs (30d)
24

Description

rustfmt currently provides the ability to print configuration details in various forms:

  • default (documented briefly here) which dumps the full set of configuration options with their default values, regardless any existing detected or specified configuration inputs
  • current - dumps the configuration incorporating specified and detected values (e.g. any additionally included command line flags, detected configuration files, etc.)
  • minimal - the subset of the configurations from current that are actively utilized when formatting some specified input code/file (the primary use case for this is to help users locate unused/inoperable options and to be able to remove them from their rustfmt config file)

in #6247 there was some discussion about potential enhancements to this current configuration printing feature, and I'd suggest there's two potential (non mutually exclusive) items we could consider:

  • show the full set of configuration options with the default values based on the specified style edition
  • show the subset of configuration options that changed for a specified style edition

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reviewing rustfmt's existing configuration-printing behavior described in README.md and the discussion in issue #6247. Define the desired edition-aware output for default and/or changed options, then verify that the selected enhancement is implemented and covered by the project's relevant tests.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
cli, tooling
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.