rust-lang / rust-lang/rustfmt

stdout / stderr policy

Open
#2,696 2 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

A-io E-needs-design P-medium
Dominant language
Rust
Stars
7k
Forks
1.1k
Avg merge
2d 13h
Merged PRs (30d)
24

Description

Currently rustfmt emits a lot of output, including warnings, Warnings, internal errors, etc.

Most of it seems to be information relevant for debugging rustfmt, but not that relevant to users which cannot do much about it in most cases.

It would be great to clean some of this up such that:

  • the warnings emitted are things that users can do something about (e.g. a configuration option that doesn't exist)
  • the errors emitted are errors that make rustfmt fail such that no formatting is applied (e.g. parsing errors, configuration option with incorrect value)

For all other things rustfmt could have a --verbose option (or cargo fmt -vv) that prints what are currently internal errors, exceeded max line limit, and other things that while useful for debugging, aren't really actionable for users.

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

No files or tests are named. Start by tracing rustfmt’s current stdout/stderr emission paths and classify which warnings and errors are actionable versus diagnostic; define and test the user-facing behavior, including a verbose mode for non-actionable output.

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
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.