From 564d134c7513d9fc252197c6d4e1e0e9192da906 Mon Sep 17 00:00:00 2001 From: Denis Blank Date: Fri, 3 Apr 2020 18:13:41 +0200 Subject: [PATCH] Improve the clang-tidy and clang-format config --- .clang-format | 27 ++++++++++++++++++++------- .clang-tidy | 4 ++-- 2 files changed, 22 insertions(+), 9 deletions(-) diff --git a/.clang-format b/.clang-format index 47e1248..247d018 100644 --- a/.clang-format +++ b/.clang-format @@ -1,15 +1,28 @@ BasedOnStyle: LLVM +AlignAfterOpenBracket: Align +AllowAllArgumentsOnNextLine: 'true' +AllowAllConstructorInitializersOnNextLine: 'true' +AllowAllParametersOfDeclarationOnNextLine: 'true' +AllowShortCaseLabelsOnASingleLine: 'false' +AllowShortFunctionsOnASingleLine: Empty +AllowShortLambdasOnASingleLine: Empty +AlwaysBreakTemplateDeclarations: 'Yes' +BinPackArguments: 'true' +BinPackParameters: 'true' +BreakConstructorInitializers: BeforeComma +BreakConstructorInitializersBeforeComma: 'true' +ConstructorInitializerIndentWidth: 2 +FixNamespaceComments: 'true' +IndentCaseLabels: 'true' +IndentPPDirectives: AfterHash +PenaltyBreakAssignment: 1000 +PenaltyBreakBeforeFirstCallParameter: 100 PointerAlignment: Left -IndentCaseLabels: true -AllowShortFunctionsOnASingleLine: false -AllowShortCaseLabelsOnASingleLine: false -AlwaysBreakTemplateDeclarations: true -BinPackArguments: true -FixNamespaceComments: true -# IndentPPDirectives: AfterHash + MacroBlockBegin: "^CONTINUABLE_BLOCK_.*_BEGIN$" MacroBlockEnd: "^CONTINUABLE_BLOCK_.*_END$" + IncludeCategories: - Regex: '^<+[a-z_]+>' Priority: 1 diff --git a/.clang-tidy b/.clang-tidy index 2ffda01..6fd6d2b 100644 --- a/.clang-tidy +++ b/.clang-tidy @@ -1,4 +1,4 @@ -Checks: '-*,cppcoreguidelines-*,-cppcoreguidelines-pro-type-vararg,modernize--*,llvm-*,misc-*,readability-identifier-naming' +Checks: '-*,cppcoreguidelines-*,-cppcoreguidelines-pro-type-vararg,-cppcoreguidelines-macro-usage,bugprone-*,modernize-*,boost-*,llvm-*,misc-*,portability-*,readability-*' CheckOptions: - key: readability-identifier-naming.ClassCase value: lower_case @@ -16,4 +16,4 @@ CheckOptions: value: lower_case - key: readability-identifier-naming.Macro value: UPPER_CASE -HeaderFilterRegex: 'include/.(hpp)$' +HeaderFilterRegex: 'include/continuable/.(hpp)$'