gplugin/gplugin

Flatten .clang-format
develop
2020-02-13, Richard Laager
c3b9a8deabe3
Parents 27dc57f26824
Children c99a7998e230
Flatten .clang-format

This replaces .clang-format with the output of clang-format -dump-config,
which eliminates the "BasedOnStyle", all comments (including TODOs), etc.
  • +75 -26
    .clang-format
  • --- a/.clang-format Mon Feb 10 21:43:50 2020 -0600
    +++ b/.clang-format Thu Feb 13 23:52:27 2020 -0600
    @@ -1,31 +1,31 @@
    -BasedOnStyle: Mozilla
    -
    -# TODO: Consider changing to AlwaysBreak for shorter lines.
    -# TODO: This would also be more consistent with the manual formatting of
    -# TODO: functions like g_object_get(). If we use that, we could remove
    -# TODO: the "clang-format off" for gtk_widget_class_bind_template_child
    -# TODO: in gplugin-gtk/gplugin-gtk-plugin-info.c.
    +---
    +Language: Cpp
    +AccessModifierOffset: -2
    AlignAfterOpenBracket: Align
    AlignConsecutiveAssignments: false
    AlignConsecutiveDeclarations: false
    -#AlignConsecutiveMacros: true
    AlignEscapedNewlines: DontAlign
    +AlignOperands: true
    +AlignTrailingComments: true
    +AllowAllParametersOfDeclarationOnNextLine: false
    AllowShortBlocksOnASingleLine: false
    AllowShortCaseLabelsOnASingleLine: false
    AllowShortFunctionsOnASingleLine: None
    AllowShortIfStatementsOnASingleLine: false
    AllowShortLoopsOnASingleLine: false
    +AlwaysBreakAfterDefinitionReturnType: TopLevel
    AlwaysBreakAfterReturnType: All
    +AlwaysBreakBeforeMultilineStrings: false
    +AlwaysBreakTemplateDeclarations: true
    BinPackArguments: true
    -BraceWrapping:
    +BinPackParameters: false
    +BraceWrapping:
    AfterClass: false
    AfterControlStatement: false
    AfterEnum: false
    - # TODO: There are quite a few "true" here.
    AfterFunction: false
    AfterNamespace: false
    AfterObjCDeclaration: false
    - # TODO: There are some "true" here. If changed, change Enum and Union.
    AfterStruct: false
    AfterUnion: false
    AfterExternBlock: false
    @@ -35,31 +35,80 @@
    SplitEmptyFunction: true
    SplitEmptyRecord: false
    SplitEmptyNamespace: true
    +BreakBeforeBinaryOperators: None
    BreakBeforeBraces: Custom
    +BreakBeforeInheritanceComma: true
    +BreakBeforeTernaryOperators: true
    +BreakConstructorInitializersBeforeComma: false
    +BreakConstructorInitializers: BeforeComma
    +BreakAfterJavaFieldAnnotations: false
    +BreakStringLiterals: true
    +ColumnLimit: 80
    +CommentPragmas: '^ IWYU pragma:'
    +CompactNamespaces: false
    +ConstructorInitializerAllOnOneLineOrOnePerLine: false
    +ConstructorInitializerIndentWidth: 2
    ContinuationIndentWidth: 4
    -#DeriveLineEnding: false
    +Cpp11BracedListStyle: false
    DerivePointerAlignment: false
    -IncludeBlocks: Preserve
    -#IndentCaseBlocks: false
    +DisableFormat: false
    +ExperimentalAutoDetectBinPacking: false
    +FixNamespaceComments: false
    +ForEachMacros:
    + - foreach
    + - Q_FOREACH
    + - BOOST_FOREACH
    +IncludeBlocks: Preserve
    +IncludeCategories:
    + - Regex: '^"(llvm|llvm-c|clang|clang-c)/'
    + Priority: 2
    + - Regex: '^(<|"(gtest|gmock|isl|json)/)'
    + Priority: 3
    + - Regex: '.*'
    + Priority: 1
    +IncludeIsMainRegex: '(Test)?$'
    IndentCaseLabels: true
    -#IndentGotoLabels: false
    -IndentWidth: 4
    +IndentPPDirectives: None
    +IndentWidth: 4
    IndentWrappedFunctionNames: false
    +JavaScriptQuotes: Leave
    +JavaScriptWrapImports: true
    +KeepEmptyLinesAtTheStartOfBlocks: true
    +MacroBlockBegin: ''
    +MacroBlockEnd: ''
    MaxEmptyLinesToKeep: 2
    +NamespaceIndentation: None
    +ObjCBlockIndentWidth: 2
    +ObjCSpaceAfterProperty: true
    +ObjCSpaceBeforeProtocolList: false
    +PenaltyBreakAssignment: 2
    +PenaltyBreakBeforeFirstCallParameter: 19
    +PenaltyBreakComment: 300
    +PenaltyBreakFirstLessLess: 120
    +PenaltyBreakString: 1000
    +PenaltyExcessCharacter: 1000000
    +PenaltyReturnTypeOnItsOwnLine: 200
    PointerAlignment: Right
    -ReflowComments: true
    -SortIncludes: false
    +RawStringFormats:
    + - Delimiter: pb
    + Language: TextProto
    + BasedOnStyle: google
    +ReflowComments: true
    +SortIncludes: false
    +SortUsingDeclarations: true
    SpaceAfterCStyleCast: false
    -# TODO: This is roughly 50/50 with ControlStatements
    +SpaceAfterTemplateKeyword: false
    +SpaceBeforeAssignmentOperators: true
    SpaceBeforeParens: Never
    -#SpaceBeforeSquareBrackets: false
    -#SpaceInEmptyBlock: false
    SpaceInEmptyParentheses: false
    +SpacesBeforeTrailingComments: 1
    +SpacesInAngles: false
    +SpacesInContainerLiterals: false
    SpacesInCStyleCastParentheses: false
    -#SpacesInConditionalStatement: false
    -SpacesInContainerLiterals: false
    SpacesInParentheses: false
    SpacesInSquareBrackets: false
    -TabWidth: 4
    -#UseCRLF: false
    -UseTab: ForIndentation
    +Standard: Cpp11
    +TabWidth: 4
    +UseTab: ForIndentation
    +...
    +