Skip to content

Make lint formulation more consistent #10631

Closed
@bluthej

Description

@bluthej

Description

When trying to figure out how I should formulate the documentation for clear_with_drain, I had a look at how other lints are formulated, and I found a few different ways which are pretty much equivalent.

Here are the statistics I gathered:

Formulation Number of occurrences
"Checks for usage" 59
"Checks for use" 16
"Checks for usages" 12
"Checks for uses" 6
"Checks for using" 3
"Detect uses" 2
"Detects uses" 2
"Check for use" 1
"Detect use" 1
Total 102

Note: I used case-insensitive search and I made sure plural and singular forms were counted separately by using [^s] in the regexes for singular forms. Also, to double check, the Total is not just the sum of all the occurrences, it was obtained by a single call with a regex that matches all these cases (and more which I did not include because they had 0 occurrences).

These represent about 1/6 of the total number of lints, which is quite significant.

I propose to standardize the formulation, opting for the most frequent one, i.e. Checks for usage. Of course, I am open to picking a different one if a native English speaker (which I'm not) tells me that it is not the most idiomatic 🙂

Version

No response

Additional Labels

@rustbot label +C-enhancement +A-documentation

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-documentationArea: Adding or improving documentationC-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