This is an archive of the discontinued LLVM Phabricator instance.

[libc++] [NFC] Disable clang-tidy's readability-identifier-naming check
ClosedPublic

Authored by philnik on Nov 14 2021, 9:46 AM.

Details

Summary

In libc++ most of the names are not conforming to the llvm style. Removing the readability-identifier-naming check removes almost all clang-tidy warnings. For example in <string> the warning count goes from 1001 warnings down to 7.

Diff Detail

Event Timeline

philnik created this revision.Nov 14 2021, 9:46 AM
philnik requested review of this revision.Nov 14 2021, 9:46 AM
Herald added a project: Restricted Project. · View Herald TranscriptNov 14 2021, 9:46 AM
Herald added a reviewer: Restricted Project. · View Herald Transcript
philnik edited the summary of this revision. (Show Details)Nov 14 2021, 3:28 PM
  • The commit message seems overconfident. ;) It'd be better to say something about the functionality of the patch, e.g. "[libc++] [NFC] Disable clang-tidy's readability-identifier-naming check."
  • Adding this new .clang-tidy file isn't going to automagically enable code-review-spam from clang-tidy on Phab reviews, is it? We've successfully banished clang-format-spam through some black magic I don't understand, so I hope this isn't similar black magic to enable a new kind of spam.

LGTM % those comments, though.

philnik retitled this revision from [libc++] Make clang-tidy usable in libc++ to [libc++] [NFC] Disable clang-tidy's readability-identifier-naming check.Nov 15 2021, 1:07 AM

I don't think it is enabling anything automagically. At least that's not the intention.

Mordante accepted this revision as: Mordante.Nov 15 2021, 8:34 AM
Mordante added a subscriber: Mordante.

It would be interesting to have settings would find real issues in libc++. When we have those I wouldn't mind to enable them. (I'm not sure how feasible that is, since we sometimes write "bad code" on purpose.)

But this check is indeed not useful in libc++ so LGTM. I think it would be nice to keep the commit message more neutral or provide numbers of the number of warnings this removes.

philnik edited the summary of this revision. (Show Details)Nov 15 2021, 3:38 PM
ldionne accepted this revision.Nov 16 2021, 6:28 AM
This revision is now accepted and ready to land.Nov 16 2021, 6:28 AM

@philnik If you intend to keep contributing feel free to request commit access https://llvm.org/docs/DeveloperPolicy.html#obtaining-commit-access.