From 97dfcfa813da1af15193414331eea55d827d453a Mon Sep 17 00:00:00 2001 From: Evan Palmer Date: Tue, 12 Mar 2024 15:23:18 -0700 Subject: [PATCH] Updated clang configurations --- .clang-format | 2 +- .clang-tidy | 84 ++++++++++++++++++++++++++++++++++++++++++++------- 2 files changed, 74 insertions(+), 12 deletions(-) diff --git a/.clang-format b/.clang-format index 5e0792e..369d0cd 100644 --- a/.clang-format +++ b/.clang-format @@ -1,7 +1,7 @@ --- Language: Cpp BasedOnStyle: Google -ColumnLimit: 100 +ColumnLimit: 120 MaxEmptyLinesToKeep: 1 IndentWidth: 2 diff --git a/.clang-tidy b/.clang-tidy index d235ad0..9c51a5c 100644 --- a/.clang-tidy +++ b/.clang-tidy @@ -25,7 +25,8 @@ Checks: > -bugprone-easily-swappable-parameters, -bugprone-implicit-widening-of-multiplication-result, -clang-diagnostic-error, - -bugprone-exception-escape + -bugprone-exception-escape, + -misc-include-cleaner WarningsAsErrors: "*" CheckOptions: - key: readability-braces-around-statements.ShortStatementLines @@ -39,9 +40,9 @@ CheckOptions: - key: readability-identifier-naming.TemplateParameterCase, value: CamelCase, - key: readability-identifier-naming.FunctionCase - value: camelBack + value: lower_case - key: readability-identifier-naming.MethodCase - value: camelBack + value: lower_case - key: readability-identifier-naming.VariableCase value: lower_case - key: readability-identifier-naming.ClassMemberCase @@ -64,17 +65,78 @@ CheckOptions: value: CamelCase - key: readability-identifier-naming.GlobalConstantPrefix value: k - - key: readability-identifier-naming.MemberConstantCase + - key: readability-identifier-naming.StaticConstantCase value: CamelCase - - key: readability-identifier-naming.MemberConstantPrefix + - key: readability-identifier-naming.StaticConstantPrefix + value: k +--- +Checks: > + -*, + abseil-*, + bugprone-*, + google-*, + misc-*, + modernize-*, + performance-*, + portability-*, + readability-*, + -google-readability-braces-around-statements, + -google-readability-namespace-comments, + -google-runtime-references, + -misc-non-private-member-variables-in-classes, + -modernize-return-braced-init-list, + -modernize-use-trailing-return-type, + -readability-braces-around-statements, + -readability-identifier-length, + -readability-magic-numbers, + -readability-named-parameter, + -readability-redundant-declaration, + -readability-function-cognitive-complexity, + -bugprone-narrowing-conversions, + -bugprone-easily-swappable-parameters, + -bugprone-implicit-widening-of-multiplication-result, + -clang-diagnostic-error, + -bugprone-exception-escape, + -misc-include-cleaner +WarningsAsErrors: "*" +CheckOptions: + - key: readability-braces-around-statements.ShortStatementLines + value: "2" + - key: readability-identifier-naming.NamespaceCase + value: lower_case + - key: readability-identifier-naming.ClassCase + value: CamelCase + - key: readability-identifier-naming.StructCase + value: CamelCase + - key: readability-identifier-naming.TemplateParameterCase, + value: CamelCase, + - key: readability-identifier-naming.FunctionCase + value: lower_case + - key: readability-identifier-naming.MethodCase + value: lower_case + - key: readability-identifier-naming.VariableCase + value: lower_case + - key: readability-identifier-naming.ClassMemberCase + value: lower_case + - key: readability-identifier-naming.ClassMemberSuffix + value: _ + - key: readability-identifier-naming.PrivateMemberSuffix + value: _ + - key: readability-identifier-naming.ProtectedMemberSuffix + value: _ + - key: readability-identifier-naming.EnumConstantCase + value: CamelCase + - key: readability-identifier-naming.EnumConstantPrefix + value: k + - key: readability-identifier-naming.ConstexprVariableCase + value: CamelCase + - key: readability-identifier-naming.ConstexprVariablePrefix + value: k + - key: readability-identifier-naming.GlobalConstantCase + value: CamelCase + - key: readability-identifier-naming.GlobalConstantPrefix value: k - key: readability-identifier-naming.StaticConstantCase value: CamelCase - key: readability-identifier-naming.StaticConstantPrefix value: k - - key: readability-implicit-bool-conversion.AllowIntegerConditions - value: 1 - - key: readability-implicit-bool-conversion.AllowPointerConditions - value: 1 - - key: readability-function-cognitive-complexity.IgnoreMacros - value: 1