Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New lint: enforce import renaming #7276

Closed
DevinR528 opened this issue May 26, 2021 · 1 comment · Fixed by #7300
Closed

New lint: enforce import renaming #7276

DevinR528 opened this issue May 26, 2021 · 1 comment · Fixed by #7300
Labels
A-lint Area: New lints

Comments

@DevinR528
Copy link
Contributor

What it does

Check imports are renamed according to a config list (similar to disallowed_method).

Categories

  • Nursery

This is a style lint so consistency and readability (subjective).

Drawbacks

None 🤷

Example

use serde_json::Value;

Could be written as:

use serde_json::Value as JsonValue;

If everyone is ok with this in the nursery I can open a PR.

@xFrednet
Copy link
Member

This lint should fit into the groups:

  • restriction: for things which are usually not considered "bad", but may be useful to turn on in specific cases
  • or pedantic: lints which are rather strict or might have false positives

disallowed_method is only in nursery as it has some problems that need to be worked out.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-lint Area: New lints
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants