Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enable readability-inconsistent-declaration-parameter-name #33425

Conversation

jbytheway
Copy link
Contributor

Summary

SUMMARY: None

Purpose of change

More static analysis.

This check enforces that parameter names in declarations should match those in definitions. This helps ensure that names are updated when their semantics change.

Describe the solution

Enable the clang-tidy check readability-inconsistent-declaration-parameter-name.

Fix the cases it complains about.

Some other name changes that I felt were necessary as I was looking at surrounding code.

Describe alternatives you've considered

clang-tidy always keeps the definition name the same and updates declaration names. In some cases I manually switched the name the other way.

There might be other cases where it would have been good to do so. Naming is hard.

Additional context

Random fact: I think this is the longest check name so far (not counting the static analysis checks).

@ZhilkinSerg ZhilkinSerg added [C++] Changes (can be) made in C++. Previously named `Code` Code: Infrastructure / Style / Static Analysis Code internal infrastructure and style labels Aug 21, 2019
This check enforces that parameter names in declarations should match
those in definitions.
@jbytheway jbytheway force-pushed the clang_tidy_readability_inconsistent_declaration_parameter_name branch from c7fa7db to da53b5c Compare August 22, 2019 08:25
@ZhilkinSerg ZhilkinSerg merged commit a7e3321 into CleverRaven:master Aug 22, 2019
@jbytheway jbytheway deleted the clang_tidy_readability_inconsistent_declaration_parameter_name branch August 22, 2019 18:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[C++] Changes (can be) made in C++. Previously named `Code` Code: Infrastructure / Style / Static Analysis Code internal infrastructure and style
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants