Skip to content

Lint warning names should be more consistent #16545

Closed
@rusty-nail

Description

@rusty-nail

I noticed some inconsistencies in the naming of compiler warnings. For example, compare:

#[allow(unused_variable)]
#[allow(unused_imports)]
#[allow(unused_attribute)]
#[allow(non_snake_case_functions)]
#[allow(uppercase_variables)]

This jumps back and forth between singular and plural. uppercase also feels a bit inconsistent with snake_case and camel_case, but it's less clear-cut. Maybe non_snakecase_functions would make the grouping more obvious than non_snake_case_functions, to avoid the parse error "non-snake case-functions".

Perhaps part of the reason for the inconsistency is that the warning names are scattered across lint/builtin.rs, which doesn't make it easy for contributors to have a global view in mind.

Metadata

Metadata

Assignees

Labels

A-lintsArea: Lints (warnings about flaws in source code) such as unused_mut.

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions