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

Apply clang-tidy to our code base #2511

Merged
merged 16 commits into from
Mar 29, 2020
Merged

Apply clang-tidy to our code base #2511

merged 16 commits into from
Mar 29, 2020

Conversation

pleroy
Copy link
Member

@pleroy pleroy commented Mar 29, 2020

This was done using Clang Power Tools with Clang 9.0.0. I enabled the following categories of checks:

  • bugprone-*
  • google-*
  • modernize-*
  • readability-*

Of these, I disabled some checks that we don't want (e.g., non-const reference) or that are overly buggy (e.g., branch clones). There remain a number of false positives or true positives that we don't want to fix, but they are relatively few (26).

Note that for pass-by-copy-and-move, the tool apparently only flags the occurrences where it thinks that it will be beneficial (i.e., there is an rvalue passed as an actual). This leads to oddities where some parameters are now passed by copy and some by reference, but it's not really feasible to change all the const references en masse without tooling similar to ClangMR.

@eggrobin eggrobin added the LGTM label Mar 29, 2020
@pleroy pleroy merged commit 05a0579 into mockingbirdnest:master Mar 29, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants