From 5c825dcee9c78c75c09b5dab14816a28eca1cf6c Mon Sep 17 00:00:00 2001 From: Derek Argueta Date: Sat, 20 Jul 2019 08:00:35 +0000 Subject: [PATCH 1/3] clang-tidy: enable checks that don't have existing errors Signed-off-by: Derek Argueta --- .clang-tidy | 47 ++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 46 insertions(+), 1 deletion(-) diff --git a/.clang-tidy b/.clang-tidy index 3e39eb682ee8..0ae46fdb8fac 100644 --- a/.clang-tidy +++ b/.clang-tidy @@ -17,24 +17,69 @@ WarningsAsErrors: 'abseil-duration-*, abseil-string-find-startswith, abseil-upgrade-duration-conversions, bugprone-assert-side-effect, + bugprone-bool-pointer-implicit-conversion, + bugprone-copy-constructor-init, + bugprone-dangling-handle, + bugprone-forward-declaration-namespace, + bugprone-forwarding-reference-overload, + bugprone-inaccurate-erase, + bugprone-incorrect-roundings, + bugprone-integer-division, + bugprone-lambda-function-name, + bugprone-macro-repeated-side-effects, + bugprone-misplaced-operator-in-strlen-in-alloc, + bugprone-move-forwarding-reference, + bugprone-multiple-statement-macro, + bugprone-sizeof-*, + bugprone-string-*, + bugprone-suspicious-enum-usage, + bugprone-suspicious-memset-usage, + bugprone-suspicious-missing-comma, + bugprone-suspicious-semicolon, + bugprone-swapped-arguments, + bugprone-terminating-continue, + bugprone-throw-keyword-missing, + bugprone-undefined-memory-manipulation, + bugprone-undelegated-constructor, + bugprone-virtual-near-miss, bugprone-unused-raii, bugprone-use-after-move, - modernize-deprecated-headers, + clang-analyzer-security.*, + clang-analyzer-nullability.*, + clang-analyzer-valist.*, + modernize-avoid-bind, + modernize-concat-nested-namespaces, + modernize-deprecated-*, modernize-make-shared, modernize-make-unique, + modernize-redundant-void-arg, + modernize-replace-auto-*, modernize-return-braced-init-list, + modernize-shrink-to-fit, + modernize-unary-static-assert, + modernize-use-bool-literals, modernize-use-equals-default, + modernize-use-nodiscard, + modernize-use-noexcept, modernize-use-override, + modernize-use-transparent-functors, + modernize-use-uncaught-exceptions, modernize-use-using, performance-faster-string-find, performance-for-range-copy, + performance-inefficient-algorithm, performance-inefficient-vector-operation, performance-noexcept-move-constructor, + performance-move-constructor-init, + performance-type-promotion-in-math-fn, performance-unnecessary-copy-initialization, readability-braces-around-statements, readability-container-size-empty, readability-redundant-control-flow, + readability-redundant-declaration, + readability-redundant-function-ptr-dereference, readability-redundant-member-init, + readability-redundant-preprocessor, readability-redundant-smartptr-get, readability-redundant-string-cstr' From 53febd6dfd48f64f61f581e68f467c75f7997421 Mon Sep 17 00:00:00 2001 From: Derek Argueta Date: Sat, 20 Jul 2019 17:55:36 +0000 Subject: [PATCH 2/3] reduce to just performance-* Signed-off-by: Derek Argueta --- .clang-tidy | 43 ------------------------------------------- 1 file changed, 43 deletions(-) diff --git a/.clang-tidy b/.clang-tidy index 0ae46fdb8fac..ccd06b3f652c 100644 --- a/.clang-tidy +++ b/.clang-tidy @@ -17,53 +17,13 @@ WarningsAsErrors: 'abseil-duration-*, abseil-string-find-startswith, abseil-upgrade-duration-conversions, bugprone-assert-side-effect, - bugprone-bool-pointer-implicit-conversion, - bugprone-copy-constructor-init, - bugprone-dangling-handle, - bugprone-forward-declaration-namespace, - bugprone-forwarding-reference-overload, - bugprone-inaccurate-erase, - bugprone-incorrect-roundings, - bugprone-integer-division, - bugprone-lambda-function-name, - bugprone-macro-repeated-side-effects, - bugprone-misplaced-operator-in-strlen-in-alloc, - bugprone-move-forwarding-reference, - bugprone-multiple-statement-macro, - bugprone-sizeof-*, - bugprone-string-*, - bugprone-suspicious-enum-usage, - bugprone-suspicious-memset-usage, - bugprone-suspicious-missing-comma, - bugprone-suspicious-semicolon, - bugprone-swapped-arguments, - bugprone-terminating-continue, - bugprone-throw-keyword-missing, - bugprone-undefined-memory-manipulation, - bugprone-undelegated-constructor, - bugprone-virtual-near-miss, bugprone-unused-raii, bugprone-use-after-move, - clang-analyzer-security.*, - clang-analyzer-nullability.*, - clang-analyzer-valist.*, - modernize-avoid-bind, - modernize-concat-nested-namespaces, - modernize-deprecated-*, modernize-make-shared, modernize-make-unique, - modernize-redundant-void-arg, - modernize-replace-auto-*, modernize-return-braced-init-list, - modernize-shrink-to-fit, - modernize-unary-static-assert, - modernize-use-bool-literals, modernize-use-equals-default, - modernize-use-nodiscard, - modernize-use-noexcept, modernize-use-override, - modernize-use-transparent-functors, - modernize-use-uncaught-exceptions, modernize-use-using, performance-faster-string-find, performance-for-range-copy, @@ -76,10 +36,7 @@ WarningsAsErrors: 'abseil-duration-*, readability-braces-around-statements, readability-container-size-empty, readability-redundant-control-flow, - readability-redundant-declaration, - readability-redundant-function-ptr-dereference, readability-redundant-member-init, - readability-redundant-preprocessor, readability-redundant-smartptr-get, readability-redundant-string-cstr' From 6a73017b713c7e8addce0f635d556c4515a32111 Mon Sep 17 00:00:00 2001 From: Derek Argueta Date: Sat, 20 Jul 2019 23:38:49 +0000 Subject: [PATCH 3/3] don't remove modernize-deprecated-headers Signed-off-by: Derek Argueta --- .clang-tidy | 1 + 1 file changed, 1 insertion(+) diff --git a/.clang-tidy b/.clang-tidy index ccd06b3f652c..b315a91c40d1 100644 --- a/.clang-tidy +++ b/.clang-tidy @@ -19,6 +19,7 @@ WarningsAsErrors: 'abseil-duration-*, bugprone-assert-side-effect, bugprone-unused-raii, bugprone-use-after-move, + modernize-deprecated-headers, modernize-make-shared, modernize-make-unique, modernize-return-braced-init-list,