Skip to content

[clang-tidy] readability-inconsistent-declaration-parameter-name should warn in the implementation file, not in the header file #154921

@carlosgalvezp

Description

@carlosgalvezp

Warning in the header file is not good, because:

  • It warns also on system headers, even if the user does not want warnings in system headers. The user cannot insert NOLINT suppressions in these headers. Perhaps this is a deeper bug in ClangDiagnosticsConsumer ?

  • If there is inconsistency, most of the times one wants to change the implementation, not the header, which is likely shared among many other translation units, which would then have to also be changed accordingly, creating code churn. Such a change in a header needs to be a careful design decision, not a change suggested by a linter.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions