From 1526528a01771604110b6a8b3bb53e05355264b5 Mon Sep 17 00:00:00 2001 From: Andrei Litvin Date: Fri, 22 Apr 2022 09:27:02 -0400 Subject: [PATCH] Make tidy file readable (#17613) * Make tidy file readable * Ignore third_party in examples - examples often copy third_party and we do not want to validate those (e.g. nlio errors out in else after return) --- .clang-tidy | 48 ++++++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 46 insertions(+), 2 deletions(-) diff --git a/.clang-tidy b/.clang-tidy index 08060772cbfc65..094437b67c177b 100644 --- a/.clang-tidy +++ b/.clang-tidy @@ -1,4 +1,48 @@ --- -Checks: 'readability-else-after-return,modernize-use-nullptr,bugprone-*,-bugprone-not-null-terminated-result,-bugprone-suspicious-memory-comparison,-bugprone-argument-comment,-bugprone-unused-return-value,-bugprone-branch-clone,-bugprone-easily-swappable-parameters,-bugprone-reserved-identifier,-bugprone-macro-parentheses,-bugprone-forward-declaration-namespace,-bugprone-forwarding-reference-overload,-bugprone-undelegated-constructor,-bugprone-sizeof-expression,-bugprone-implicit-widening-of-multiplication-result,-bugprone-too-small-loop-variable,-bugprone-narrowing-conversions,-bugprone-misplaced-widening-cast,-bugprone-suspicious-include,-bugprone-signed-char-misuse,-bugprone-copy-constructor-init,-clang-analyzer-core.CallAndMessage,-clang-analyzer-core.UndefinedBinaryOperatorResult,-clang-analyzer-core.NullDereference,-clang-analyzer-optin.cplusplus.UninitializedObject,-clang-analyzer-core.uninitialized.Branch,-clang-analyzer-optin.performance,-clang-analyzer-optin.osx.cocoa.localizability.EmptyLocalizationContextChecker,-clang-analyzer-deadcode.DeadStores,-clang-analyzer-cplusplus.Move,-clang-analyzer-optin.cplusplus.VirtualCall,-clang-analyzer-security.insecureAPI.strcpy,-clang-analyzer-nullability.NullablePassedToNonnull,-clang-analyzer-optin.performance.Padding,-clang-analyzer-security.insecureAPI.bzero,-clang-analyzer-unix.cstring.NullArg,-clang-analyzer-security.insecureAPI.rand,-clang-analyzer-core.NonNullParamChecker,-clang-analyzer-nullability.NullPassedToNonnull,-clang-analyzer-unix.Malloc,-clang-analyzer-valist.Unterminated,-clang-analyzer-cplusplus.NewDeleteLeaks,-clang-diagnostic-implicit-int-conversion' +Checks: > + readability-else-after-return, + modernize-use-nullptr, + bugprone-*, + -bugprone-not-null-terminated-result, + -bugprone-suspicious-memory-comparison, + -bugprone-argument-comment, + -bugprone-unused-return-value, + -bugprone-branch-clone, + -bugprone-easily-swappable-parameters, + -bugprone-reserved-identifier, + -bugprone-macro-parentheses, + -bugprone-forward-declaration-namespace, + -bugprone-forwarding-reference-overload, + -bugprone-undelegated-constructor, + -bugprone-sizeof-expression, + -bugprone-implicit-widening-of-multiplication-result, + -bugprone-too-small-loop-variable, + -bugprone-narrowing-conversions, + -bugprone-misplaced-widening-cast, + -bugprone-suspicious-include, + -bugprone-signed-char-misuse, + -bugprone-copy-constructor-init, + -clang-analyzer-core.CallAndMessage, + -clang-analyzer-core.UndefinedBinaryOperatorResult, + -clang-analyzer-core.NullDereference, + -clang-analyzer-optin.cplusplus.UninitializedObject, + -clang-analyzer-core.uninitialized.Branch, + -clang-analyzer-optin.performance, + -clang-analyzer-optin.osx.cocoa.localizability.EmptyLocalizationContextChecker, + -clang-analyzer-deadcode.DeadStores, + -clang-analyzer-cplusplus.Move, + -clang-analyzer-optin.cplusplus.VirtualCall, + -clang-analyzer-security.insecureAPI.strcpy, + -clang-analyzer-nullability.NullablePassedToNonnull, + -clang-analyzer-optin.performance.Padding, + -clang-analyzer-security.insecureAPI.bzero, + -clang-analyzer-unix.cstring.NullArg, + -clang-analyzer-security.insecureAPI.rand, + -clang-analyzer-core.NonNullParamChecker, + -clang-analyzer-nullability.NullPassedToNonnull, + -clang-analyzer-unix.Malloc, + -clang-analyzer-valist.Unterminated, + -clang-analyzer-cplusplus.NewDeleteLeaks, + -clang-diagnostic-implicit-int-conversion WarningsAsErrors: '*' -HeaderFilterRegex: '(src|examples|zzz_generated|credentials)' +HeaderFilterRegex: '(src|examples|zzz_generated|credentials).*(?