Skip to content

lint identity_conversion name is misleading #3106

@imp

Description

@imp

The lint identity_conversion has a somewhat misleading name. It feels like it suggests the identity conversion is being actually done somewhere in the code. In reality, however, this lint checks for useless conversion from some type to the very same type. Indeed, the error that is reported by this lint is error: identical conversion, which points exactly to the issue in hand.
I want to suggest renaming the lint to match the error report.
I.e. identity_conversion -> identical_conversion
Or, perhaps, to useless_identity_conversion (which is admittedly longer name).

What is the policy on lint renaming? Is it something that may be done at all? Supported?
Encouraged/discouraged?

Metadata

Metadata

Assignees

No one assigned

    Labels

    C-enhancementCategory: Enhancement of lints, like adding more cases or adding help messagesS-needs-discussionStatus: Needs further discussion before merging or work can be started

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions