Skip to content
Snippets Groups Projects
.clang-format 2.88 KiB
Newer Older
  • Learn to ignore specific revisions
  • Andrea Michelotti's avatar
    Andrea Michelotti committed
    Language: Cpp
    
    Claudio Bisegni's avatar
    Claudio Bisegni committed
    # BasedOnStyle:  Google
    AccessModifierOffset: -1
    AlignAfterOpenBracket: Align
    AlignConsecutiveAssignments: true
    
    Claudio Bisegni's avatar
    Claudio Bisegni committed
    AlignConsecutiveDeclarations: true
    
    Claudio Bisegni's avatar
    Claudio Bisegni committed
    AlignEscapedNewlines: Left
    
    Andrea Michelotti's avatar
    Andrea Michelotti committed
    AlignOperands: true
    
    Claudio Bisegni's avatar
    Claudio Bisegni committed
    AllowAllParametersOfDeclarationOnNextLine: false
    AllowShortBlocksOnASingleLine: false
    AllowShortCaseLabelsOnASingleLine: false
    AllowShortFunctionsOnASingleLine: All
    
    AllowShortIfStatementsOnASingleLine: true
    AllowShortLoopsOnASingleLine: true
    
    Claudio Bisegni's avatar
    Claudio Bisegni committed
    AlwaysBreakAfterDefinitionReturnType: None
    AlwaysBreakAfterReturnType: None
    
    AlwaysBreakBeforeMultilineStrings: false
    AlwaysBreakTemplateDeclarations: false
    
    Claudio Bisegni's avatar
    Claudio Bisegni committed
    BinPackArguments: false
    BinPackParameters: false
    
    Andrea Michelotti's avatar
    Andrea Michelotti committed
      AfterClass: false
    
    Claudio Bisegni's avatar
    Claudio Bisegni committed
      AfterControlStatement: false
    
    Andrea Michelotti's avatar
    Andrea Michelotti committed
      AfterEnum: false
      AfterFunction: false
      AfterNamespace: false
    
    Claudio Bisegni's avatar
    Claudio Bisegni committed
      AfterObjCDeclaration: false
    
    Andrea Michelotti's avatar
    Andrea Michelotti committed
      AfterStruct: false
      AfterUnion: false
      BeforeCatch: false
      BeforeElse: false
      IndentBraces: false
    
    Claudio Bisegni's avatar
    Claudio Bisegni committed
      SplitEmptyRecord: true
      SplitEmptyNamespace: true
    BreakBeforeBinaryOperators: None
    BreakBeforeBraces: Attach
    BreakBeforeInheritanceComma: false
    
    BreakBeforeTernaryOperators: true
    
    Claudio Bisegni's avatar
    Claudio Bisegni committed
    BreakConstructorInitializersBeforeComma: true
    BreakConstructorInitializers: BeforeColon
    BreakAfterJavaFieldAnnotations: false
    BreakStringLiterals: true
    
    Andrea Michelotti's avatar
    Andrea Michelotti committed
    ColumnLimit: 0
    CommentPragmas: "^ IWYU pragma:"
    
    Claudio Bisegni's avatar
    Claudio Bisegni committed
    CompactNamespaces: false
    ConstructorInitializerAllOnOneLineOrOnePerLine: true
    
    ConstructorInitializerIndentWidth: 4
    ContinuationIndentWidth: 4
    Cpp11BracedListStyle: true
    
    Claudio Bisegni's avatar
    Claudio Bisegni committed
    DerivePointerAlignment: true
    
    Andrea Michelotti's avatar
    Andrea Michelotti committed
    DisableFormat: false
    
    ExperimentalAutoDetectBinPacking: false
    
    Claudio Bisegni's avatar
    Claudio Bisegni committed
    FixNamespaceComments: true
    ForEachMacros:
      - foreach
      - Q_FOREACH
      - BOOST_FOREACH
    IncludeCategories:
    
    Andrea Michelotti's avatar
    Andrea Michelotti committed
      - Regex: '^<ext/.*\.h>'
        Priority: 2
      - Regex: '^<.*\.h>'
        Priority: 1
      - Regex: "^<.*"
        Priority: 2
      - Regex: ".*"
        Priority: 3
    IncludeIsMainRegex: "([-_](test|unittest))?$"
    
    Andrea Michelotti's avatar
    Andrea Michelotti committed
    IndentWidth: 2
    
    Claudio Bisegni's avatar
    Claudio Bisegni committed
    IndentWrappedFunctionNames: false
    JavaScriptQuotes: Leave
    JavaScriptWrapImports: true
    KeepEmptyLinesAtTheStartOfBlocks: false
    
    Andrea Michelotti's avatar
    Andrea Michelotti committed
    MacroBlockBegin: ""
    MacroBlockEnd: ""
    
    Claudio Bisegni's avatar
    Claudio Bisegni committed
    MaxEmptyLinesToKeep: 1
    
    Claudio Bisegni's avatar
    Claudio Bisegni committed
    ObjCBlockIndentWidth: 2
    ObjCSpaceAfterProperty: false
    ObjCSpaceBeforeProtocolList: false
    PenaltyBreakAssignment: 2
    PenaltyBreakBeforeFirstCallParameter: 1
    
    PenaltyBreakComment: 300
    PenaltyBreakFirstLessLess: 120
    PenaltyBreakString: 1000
    PenaltyExcessCharacter: 1000000
    
    Claudio Bisegni's avatar
    Claudio Bisegni committed
    PenaltyReturnTypeOnItsOwnLine: 200
    PointerAlignment: Left
    
    Andrea Michelotti's avatar
    Andrea Michelotti committed
    ReflowComments: true
    SortIncludes: true
    
    Claudio Bisegni's avatar
    Claudio Bisegni committed
    SortUsingDeclarations: true
    SpaceAfterCStyleCast: false
    SpaceAfterTemplateKeyword: true
    
    SpaceBeforeAssignmentOperators: true
    SpaceBeforeParens: ControlStatements
    SpaceInEmptyParentheses: false
    
    Claudio Bisegni's avatar
    Claudio Bisegni committed
    SpacesBeforeTrailingComments: 2
    
    Andrea Michelotti's avatar
    Andrea Michelotti committed
    SpacesInAngles: false
    
    SpacesInContainerLiterals: true
    SpacesInCStyleCastParentheses: false
    SpacesInParentheses: false
    
    Claudio Bisegni's avatar
    Claudio Bisegni committed
    SpacesInSquareBrackets: false
    
    Andrea Michelotti's avatar
    Andrea Michelotti committed
    Standard: Auto
    TabWidth: 8
    UseTab: Never