[PATCH] D57573: Disable tidy checks with too many hits

Ilya Biryukov via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Feb 1 02:24:51 PST 2019


ilya-biryukov created this revision.
ilya-biryukov added a reviewer: alexfh.
Herald added projects: clang, LLVM.

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).


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D57573

Files:
  .clang-tidy
  clang/.clang-tidy


Index: clang/.clang-tidy
===================================================================
--- clang/.clang-tidy
+++ clang/.clang-tidy
@@ -1,4 +1,7 @@
-Checks: '-*,clang-diagnostic-*,llvm-*,misc-*,-misc-unused-parameters,readability-identifier-naming'
+Checks: '-*,clang-diagnostic-*,llvm-*,misc-*,-misc-unused-parameters,-misc-non-private-member-variables-in-classes,-readability-identifier-naming'
+# Note that the naming checks are disabled, there are too many violations in the codebase.
+# Naming settings are kept for documentation purposes and in cases where one would enable the check by
+# overriding this configuration file.
 CheckOptions:
   - key:             readability-identifier-naming.ClassCase
     value:           CamelCase
Index: .clang-tidy
===================================================================
--- .clang-tidy
+++ .clang-tidy
@@ -1,4 +1,4 @@
-Checks: '-*,clang-diagnostic-*,llvm-*,misc-*,-misc-unused-parameters,readability-identifier-naming'
+Checks: '-*,clang-diagnostic-*,llvm-*,misc-*,-misc-unused-parameters,-misc-non-private-member-variables-in-classes,readability-identifier-naming'
 CheckOptions:
   - key:             readability-identifier-naming.ClassCase
     value:           CamelCase


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D57573.184701.patch
Type: text/x-patch
Size: 1238 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20190201/aa3338bd/attachment.bin>


More information about the cfe-commits mailing list