Skip to content

Commit d226bc8

Browse files
committed
Disable tidy checks with too many hits
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
1 parent 7857215 commit d226bc8

File tree

3 files changed

+8
-3
lines changed

3 files changed

+8
-3
lines changed

.clang-tidy

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
Checks: '-*,clang-diagnostic-*,llvm-*,misc-*,-misc-unused-parameters,readability-identifier-naming'
1+
Checks: '-*,clang-diagnostic-*,llvm-*,misc-*,-misc-unused-parameters,-misc-non-private-member-variables-in-classes,readability-identifier-naming'
22
CheckOptions:
33
- key: readability-identifier-naming.ClassCase
44
value: CamelCase

clang/.clang-tidy

+6-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,9 @@
1-
Checks: '-*,clang-diagnostic-*,llvm-*,misc-*,-misc-unused-parameters,readability-identifier-naming'
1+
Checks: '-*,clang-diagnostic-*,llvm-*,misc-*,-misc-unused-parameters,-misc-non-private-member-variables-in-classes,-readability-identifier-naming'
2+
# Note that the readability-identifier-naming check is disabled, there are too
3+
# many violations in the codebase and they create too much noise in clang-tidy
4+
# results.
5+
# Naming settings are kept for documentation purposes and allowing to run the
6+
# check if the users would override this file, e.g. via a command-line arg.
27
CheckOptions:
38
- key: readability-identifier-naming.ClassCase
49
value: CamelCase

llvm/.clang-tidy

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
Checks: '-*,clang-diagnostic-*,llvm-*,misc-*,-misc-unused-parameters,readability-identifier-naming'
1+
Checks: '-*,clang-diagnostic-*,llvm-*,misc-*,-misc-unused-parameters,-misc-non-private-member-variables-in-classes,readability-identifier-naming'
22
CheckOptions:
33
- key: readability-identifier-naming.ClassCase
44
value: CamelCase

0 commit comments

Comments
 (0)