From 71b0961fb2c69b74bd9b35b78a4b25ae85e341fa Mon Sep 17 00:00:00 2001 From: Roflmuffin Date: Wed, 11 Oct 2023 20:41:20 +1000 Subject: [PATCH] chore: update clang-tidy and clang-format --- .clang-format | 19 +++++++++++++++++-- .clang-tidy | 39 ++++++++++++++++++++++----------------- 2 files changed, 39 insertions(+), 19 deletions(-) diff --git a/.clang-format b/.clang-format index 98ba18a19..b2a84adf7 100644 --- a/.clang-format +++ b/.clang-format @@ -1,4 +1,19 @@ --- Language: Cpp -BasedOnStyle: Microsoft -ColumnLimit: 120 \ No newline at end of file +BasedOnStyle: Google +AccessModifierOffset: -4 +Standard: c++11 +IndentWidth: 4 +TabWidth: 4 +UseTab: Never +ColumnLimit: 100 +AlignAfterOpenBracket: Align +BinPackParameters: false +AlignEscapedNewlines: Left +AlwaysBreakTemplateDeclarations: Yes +PackConstructorInitializers: Never +BreakConstructorInitializersBeforeComma: false +IndentPPDirectives: BeforeHash +SortIncludes: Never +... + diff --git a/.clang-tidy b/.clang-tidy index e5826842b..5b02d529b 100644 --- a/.clang-tidy +++ b/.clang-tidy @@ -91,21 +91,26 @@ Checks: > # Turn all the warnings from the checks above into errors. WarningsAsErrors: "*" -HeaderFilterRegex: "(google/cloud/|generator/).*\\.h$" - CheckOptions: - - key: readability-identifier-naming.ClassCase - value: CamelCase - - key: readability-identifier-naming.EnumCase - value: CamelCase - - key: readability-identifier-naming.FunctionCase - value: CamelCase - - key: readability-identifier-naming.MemberCase - value: CamelCase - - key: readability-identifier-naming.ParameterCase - value: camelBack - - key: readability-identifier-naming.UnionCase - value: CamelCase - - key: readability-identifier-naming.VariableCase - value: camelBack -... + - key: google-readability-braces-around-statements.ShortStatementLines + value: '1' + - key: google-readability-function-size.StatementThreshold + value: '800' + - key: google-readability-namespace-comments.ShortNamespaceLines + value: '10' + - key: google-readability-namespace-comments.SpacesBeforeComments + value: '2' + - key: readability-identifier-naming.ClassCase + value: CamelCase + - key: readability-identifier-naming.MemberCase + value: camelBack + - key: readability-identifier-naming.EnumCase + value: CamelCase + - key: readability-identifier-naming.FunctionCase + value: CamelCase + - key: readability-identifier-naming.ParameterCase + value: camelBack + - key: readability-identifier-naming.UnionCase + value: CamelCase + - key: readability-identifier-naming.VariableCase + value: camelBack