rust-lang / rust-lang/rustfmt

Package name wildcard support for cargo fmt -p

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

Nobody has claimed this yet.

C-feature-request P-low
Dominant language
Rust
Stars
7k
Forks
1.1k
Avg merge
2d 13h
Merged PRs (30d)
24

Description

Problem

The -p option in cargo fmt doesn't support wildcard like *. When I'm running cargo fmt -p "cloud-*", it shows cloud-* is not a member of workspace

However, this feature is fully supported in other cargo commands like check, or even external command like clippy.

It would be nice to keep this behavior consistent among all commands.

Proposed Solution

No response

Notes

No response

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 at the cargo fmt -p package-selection entry point and compare its handling with the wildcard support used by cargo check or clippy. Done means commands such as cargo fmt -p "cloud-*" select matching workspace packages instead of reporting the pattern as an unknown member.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
cli
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.