rust-lang / rust-lang/rust-clippy

[feat] preference option to enforce use relative path style

Open
#14,410 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

A-lint
Dominant language
Rust
Stars
13.5k
Forks
2.2k
Avg merge
2d 10h
Merged PRs (30d)
32

Description

What it does

enforce use path style

Advantage

No response

Drawbacks

No response

Example

current

use {
    super::hello::hello1,
    crate::path::to::hello::{hello2, hello3},
};

feat

use_path_style = "super"

provide quickfix into

use super::hello::{hello1, hello2, hello3};
use_path_style = "crate"

provide quickfix into

use crate::path::to::hello::{hello1, hello2, hello3};

related

https://github.com/rust-lang/rustfmt/issues/6506

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 from the requested Rust import transformations and the use_path_style TOML options in the issue, then review the related rustfmt issue for existing context. Done means the preference supports both super and crate styles and provides the corresponding quickfixes for the shown imports.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
tooling
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.