From 540964a380fb034a7dfb421c1b80e86b32d5f158 Mon Sep 17 00:00:00 2001 From: Joseph Schuchart Date: Tue, 30 Oct 2018 11:10:44 -0400 Subject: [PATCH 1/2] Move clang-format file into root directory --- contrib/.clang-format => .clang-format | 0 contrib/.clang-tidy => .clang-tidy | 0 2 files changed, 0 insertions(+), 0 deletions(-) rename contrib/.clang-format => .clang-format (100%) rename contrib/.clang-tidy => .clang-tidy (100%) diff --git a/contrib/.clang-format b/.clang-format similarity index 100% rename from contrib/.clang-format rename to .clang-format diff --git a/contrib/.clang-tidy b/.clang-tidy similarity index 100% rename from contrib/.clang-tidy rename to .clang-tidy From 87f8225965b695a72170f377e36082d7413f2971 Mon Sep 17 00:00:00 2001 From: Roger Kowalewski Date: Sat, 3 Nov 2018 15:04:53 +0100 Subject: [PATCH 2/2] update and simplify clang-format --- .clang-format | 71 ++++----------------------------------------------- 1 file changed, 5 insertions(+), 66 deletions(-) diff --git a/.clang-format b/.clang-format index 3e2c1bed9..92c505e80 100644 --- a/.clang-format +++ b/.clang-format @@ -1,22 +1,11 @@ --- Language: Cpp +BasedOnStyle: Google AccessModifierOffset: -2 AlignAfterOpenBracket: AlwaysBreak AlignConsecutiveAssignments: true AlignConsecutiveDeclarations: true -AlignEscapedNewlinesLeft: true -AlignOperands: true -AlignTrailingComments: true -AllowAllParametersOfDeclarationOnNextLine: true -AllowShortBlocksOnASingleLine: false -AllowShortCaseLabelsOnASingleLine: false AllowShortFunctionsOnASingleLine: None -AllowShortIfStatementsOnASingleLine: true -AllowShortLoopsOnASingleLine: true -AlwaysBreakAfterDefinitionReturnType: None -AlwaysBreakAfterReturnType: None -AlwaysBreakBeforeMultilineStrings: true -AlwaysBreakTemplateDeclarations: true BinPackArguments: false BinPackParameters: false BraceWrapping: @@ -28,67 +17,17 @@ BraceWrapping: AfterObjCDeclaration: false AfterStruct: false AfterUnion: false + AfterExternBlock: false BeforeCatch: false BeforeElse: false IndentBraces: false -BreakBeforeBinaryOperators: None + SplitEmptyFunction: true + SplitEmptyRecord: true + SplitEmptyNamespace: true BreakBeforeBraces: Stroustrup -BreakBeforeTernaryOperators: true BreakConstructorInitializersBeforeComma: true -BreakAfterJavaFieldAnnotations: false -BreakStringLiterals: true ColumnLimit: 78 -CommentPragmas: '^ IWYU pragma:' ConstructorInitializerAllOnOneLineOrOnePerLine: false ConstructorInitializerIndentWidth: 2 -ContinuationIndentWidth: 4 -Cpp11BracedListStyle: true -DerivePointerAlignment: true -DisableFormat: false -ExperimentalAutoDetectBinPacking: false -ForEachMacros: [ foreach, Q_FOREACH, BOOST_FOREACH ] -IncludeCategories: - - Regex: '^<.*\.h>' - Priority: 1 - - Regex: '^<.*' - Priority: 2 - - Regex: '.*' - Priority: 3 -IncludeIsMainRegex: '([-_](test|unittest))?$' -IndentCaseLabels: true -IndentWidth: 2 -IndentWrappedFunctionNames: false -JavaScriptQuotes: Leave -JavaScriptWrapImports: true -KeepEmptyLinesAtTheStartOfBlocks: false -MacroBlockBegin: '' -MacroBlockEnd: '' -MaxEmptyLinesToKeep: 1 -NamespaceIndentation: None -ObjCBlockIndentWidth: 2 -ObjCSpaceAfterProperty: false -ObjCSpaceBeforeProtocolList: false -PenaltyBreakBeforeFirstCallParameter: 1 -PenaltyBreakComment: 300 -PenaltyBreakFirstLessLess: 120 -PenaltyBreakString: 1000 -PenaltyExcessCharacter: 1000000 -PenaltyReturnTypeOnItsOwnLine: 200 -PointerAlignment: Left -ReflowComments: true -SortIncludes: true -SpaceAfterCStyleCast: false -SpaceBeforeAssignmentOperators: true -SpaceBeforeParens: ControlStatements -SpaceInEmptyParentheses: false -SpacesBeforeTrailingComments: 2 -SpacesInAngles: false -SpacesInContainerLiterals: true -SpacesInCStyleCastParentheses: false -SpacesInParentheses: false -SpacesInSquareBrackets: false -Standard: Auto -TabWidth: 8 -UseTab: Never ...