Skip to content

Fix grammatical error in lint_groups_priority diagnostic suggestion #16812

@Shivangisharma4

Description

@Shivangisharma4

Summary

Currently, when the clippy::lint_groups_priority lint is triggered, the diagnostic suggestion is missing a comma, which makes the phrasing grammatically confusing.

The current output is:

"to have lints override the group set `{group_name}` to a lower priority"

Proposed Fix: Add a comma to separate the clauses for better readability:

"to have lints override the group, set `{group_name}` to a lower priority"

Implementation details: The missing punctuation is located in clippy_lints/src/cargo/lint_groups_priority.rs.
Fixing this will also require running cargo uibless to update the corresponding .stderr files in the ui-cargo/lint_groups_priority test suite.

Reproducer

Code:

<code>

Current output:

Desired output:

Version


Additional Labels

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    C-bugCategory: Clippy is not doing the correct thing

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions