aboutsummaryrefslogtreecommitdiff
path: root/.clang-tidy
AgeCommit message (Collapse)AuthorFilesLines
2024-03-05Disable clang-tidy misc-include-cleaner (#83945)Mehdi Amini1-1/+1
This does not apply well to LLVM which intentionally rely on forward declarations. Also depending on the config flags passed to CMake the result can be different.
2023-05-06Add -misc-use-anonymous-namespace to .clang-tidySergei Barannikov1-1/+1
This is at odds with the coding standard. Quoting https://llvm.org/docs/CodingStandards.html#anonymous-namespaces > Because of this, we have a simple guideline: make anonymous namespaces > as small as possible, and only use them for class declarations. Reviewed By: MaskRay Differential Revision: https://reviews.llvm.org/D149664
2022-08-08Add -misc-const-correctness to .clang-tidyArthur Eubanks1-1/+1
I keep getting suggestions from clangd to add 'const' to a bunch of local variables, which is not LLVM's style. This suppresses those. Reviewed By: kadircet, aaron.ballman Differential Revision: https://reviews.llvm.org/D131414
2022-02-01[clangd] Cleanup of readability-identifier-namingChristian Kühnel1-0/+4
Auto-generated patch based on clang-tidy readability-identifier-naming. Only some manual cleanup for `extern "C"` declarations and a GTest change was required. I'm not sure if this cleanup is actually very useful. It cleans up clang-tidy findings to the number of warnings from clang-tidy should be lower. Since it was easy to do and required only little cleanup I thought I'd upload it for discussion. One pattern that keeps recurring: Test **matchers** are also supposed to start with a lowercase letter as per LLVM convention. However GTest naming convention for matchers start with upper case. I would propose to keep stay consistent with the GTest convention there. However that would imply a lot of `//NOLINT` throughout these files. To re-product this patch run: ``` run-clang-tidy -checks="-*,readability-identifier-naming" -fix -format ./clang-tools-extra/clangd ``` To convert the macro names, I was using this script with some manual cleanup afterwards: https://gist.github.com/ChristianKuehnel/a01cc4362b07c58281554ab46235a077 Differential Revision: https://reviews.llvm.org/D115634
2022-01-23Add modernize-use-default-member-init.UseAssignment to .clang-tidyKazu Hirata1-0/+2
2022-01-03Add IgnoreBaseInCopyConstructors to .clang-tidyKazu Hirata1-1/+2
gcc issues warnings on copy constructors that do not explicitly initialize the base class.
2021-06-08.clang-tidy: Disable misc-no-recursion in general/across the monorepoDavid Blaikie1-1/+1
2020-01-31- Update .clang-tidy to ignore parameters of main like functions for naming ↵Nathan James1-0/+2
violations in clang and llvm directory Summary: Every call to a main like function in llvm and clang lib violates the naming convention for parameters. This prevents clang-tidy warning on such breaches. Reviewers: alexfh, hokein Reviewed By: hokein Subscribers: merge_guards_bot, aheejin, cfe-commits, llvm-commits Tags: #clang, #llvm Differential Revision: https://reviews.llvm.org/D73715
2019-02-01Disable tidy checks with too many hitsIlya Biryukov1-1/+1
Summary: Some tidy checks have too many hits in the codebase, making it hard to spot other results from clang-tidy, therefore rendering the tool less useful. Two checks were disabled: - misc-non-private-member-variable-in-classes in the whole LLVM monorepo, it is very common to have those in LLVM and the style guide does not forbid them. - readability-identifier-naming in the clang subtree. There are thousands of violations in 'Sema.h' alone. Before the change, 'Sema.h' had >1000 tidy warnings, after the change the number dropped to 3 warnings (unterminated namespace comments). Reviewers: alexfh, hokein Reviewed By: hokein Subscribers: llvm-commits, cfe-commits Tags: #clang, #llvm Differential Revision: https://reviews.llvm.org/D57573 llvm-svn: 352862
2019-01-29Add .clang-tidy and .clang-format files to the toplevel of theJames Y Knight1-0/+17
repository (the same content as those in llvm/ and clang/). llvm-svn: 352516