diff options
author | Nikolas Klauser <nikolasklauser@berlin.de> | 2022-03-03 22:07:09 +0300 |
---|---|---|
committer | Nikolas Klauser <nikolasklauser@berlin.de> | 2022-03-08 16:14:55 +0300 |
commit | 7aef4a0cae4789db9cd3d75caaf288b6ba18e95c (patch) | |
tree | 0a84dcd468aa267b4dc05e3cd60ddf94de20aa6b /libcxx/.clang-tidy | |
parent | 1c235c375492180c2eecb6331f169486019fd2d2 (diff) |
[libc++] Enable more clang-tidy checks and list potential candidates
These are some checks that make sense in libc++ IMO. The checks after `#TODO: investigate these checks` are candidates, but they can't be enabled without some cleanup.
Reviewed By: ldionne, #libc
Spies: aheejin, libcxx-commits
Differential Revision: https://reviews.llvm.org/D120925
Diffstat (limited to 'libcxx/.clang-tidy')
-rw-r--r-- | libcxx/.clang-tidy | 50 |
1 files changed, 49 insertions, 1 deletions
diff --git a/libcxx/.clang-tidy b/libcxx/.clang-tidy index 2f5ec878e4e6..45adea9b1b15 100644 --- a/libcxx/.clang-tidy +++ b/libcxx/.clang-tidy @@ -1,2 +1,50 @@ InheritParentConfig: true -Checks: '-readability-identifier-naming,-llvm-header-guard,-misc-unconventional-assign-operator,-llvm-else-after-return,-llvm-qualified-auto' +Checks: > + bugprone-copy-constructor-init, + bugprone-dangling-handle, + bugprone-infinite-loop, + + -llvm-else-after-return, + -llvm-header-guard, + -llvm-qualified-auto, + + -misc-unconventional-assign-operator, + + modernize-redundant-void-arg, + + readability-duplicate-include, + readability-function-cognitive-complexity, + readability-function-size, + -readability-identifier-naming, + readability-misplaced-array-index, + readability-redundant-control-flow, + readability-redundant-function-ptr-dereference, + readability-redundant-preprocessor, + readability-simplify-subscript-expr, + readability-uniqueptr-delete-release, + +CheckOptions: + - key: readability-function-cognitive-complexity.Threshold + value: 143 # TODO: bring that number down + - key: readability-function-size.LineThreshold + value: 194 # TODO: bring that number down + +# TODO: investigate these checks +# bugprone-branch-clone, +# bugprone-macro-parentheses, +# cppcoreguidelines-prefer-member-initializer, +# modernize-loop-convert, +# modernize-use-bool-literals, +# modernize-use-default-member-init, +# modernize-use-equals-default, +# modernize-use-equals-delete, +# modernize-use-nullptr, +# modernize-use-override, +# portability-restrict-system-includes, +# readability-function-cognitive-complexity, +# readability-implicit-bool-conversion, +# readability-isolate-declaration, +# readability-redundant-access-specifiers, +# readability-redundant-declaration, +# readability-redundant-member-init, +# readability-simplify-boolean-expr, |