Skip to content

[similar_names]: Configuration option to whitelist specific names #10926

Open
@Centri3

Description

@Centri3

Description

Currently, similar_names will lint on code like

fn awa(tcx: TyCtxt<'_>) {
	let ocx = { ... };
}

Which is something I ran into on #10891. IMO, tcx and ocx are short enough that you can tell them apart. Despite this, simply setting a minimum length isn't desirable; What about lli and lll? Therefore, I think this lint should have a configuration option that is by default empty that allows specific names.

@rustbot claim

Version

No response

Additional Labels

@rustbot label +C-enhancement

Metadata

Metadata

Assignees

Labels

C-enhancementCategory: Enhancement of lints, like adding more cases or adding help messages

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions