Skip to content
Snippets Groups Projects
Select Git revision
  • 9c66dbd373f70a27aca1ab67aaf2a97cffd7aa07
  • master default protected
  • release/202005
  • release/202001
  • release/201912
  • release/201911
  • release/releaseWindowsTestOne
  • release/windowsReleaseTest
  • release/releaseTest
  • release/releaseWindowsTest
  • release/201910
  • release/qt/201910
  • release/windows-test/201910
  • release/201908
  • release/201906
  • release/201905
  • release/201904
  • release/201903
  • release/201902
  • release/201901
  • release/201812
  • 4.0.0
  • 2.2.0
  • 2.1.0
  • 2.0.1
  • 2.0.0
  • 1.4.1
  • 1.4.0
  • 1.3.0
  • 1.2.0
  • 1.1.0
31 results

.clang-format

Blame
  • Code owners
    Assign users and groups as approvers for specific file changes. Learn more.
    .clang-format 3.13 KiB
    # Based on the .clang-format for Qt Creator
    #
    # This is for clang-format >= 10.0.
    #
    # https://releases.llvm.org/10.0.0/tools/clang/docs/ClangFormatStyleOptions.html
    #
    ---
    Language:        Cpp
    AccessModifierOffset: -4
    AlignAfterOpenBracket: Align
    AlignConsecutiveAssignments: false
    AlignConsecutiveDeclarations: false
    AlignConsecutiveMacros: true
    AlignEscapedNewlines: DontAlign
    AlignOperands:   true
    AlignTrailingComments: true
    AllowAllParametersOfDeclarationOnNextLine: true
    AllowShortBlocksOnASingleLine: false
    AllowShortCaseLabelsOnASingleLine: false
    AllowShortFunctionsOnASingleLine: Inline
    AllowShortIfStatementsOnASingleLine: false
    AllowShortLambdasOnASingleLine: Inline
    AllowShortLoopsOnASingleLine: false
    AlwaysBreakAfterReturnType: TopLevelDefinitions
    AlwaysBreakBeforeMultilineStrings: false
    AlwaysBreakTemplateDeclarations: Yes
    BinPackArguments: false
    BinPackParameters: false
    BraceWrapping:
      AfterClass:      true
      AfterControlStatement: false
      AfterEnum:       false
      AfterFunction:   true
      AfterNamespace:  false
      AfterObjCDeclaration: false
      AfterStruct:     true
      AfterUnion:      false
      BeforeCatch:     false
      BeforeElse:      false
      IndentBraces:    false
      SplitEmptyFunction: false
      SplitEmptyRecord: false
      SplitEmptyNamespace: false
    BreakBeforeBinaryOperators: All
    BreakBeforeBraces: Custom
    BreakBeforeInheritanceComma: false
    BreakBeforeTernaryOperators: true
    BreakConstructorInitializersBeforeComma: false
    BreakConstructorInitializers: BeforeComma
    BreakAfterJavaFieldAnnotations: false
    BreakStringLiterals: true
    ColumnLimit:    100
    CommentPragmas:  '^ IWYU pragma:'
    CompactNamespaces: false
    ConstructorInitializerAllOnOneLineOrOnePerLine: false
    ConstructorInitializerIndentWidth: 4
    ContinuationIndentWidth: 4
    Cpp11BracedListStyle: true
    DerivePointerAlignment: false
    DisableFormat:   false
    ExperimentalAutoDetectBinPacking: false
    FixNamespaceComments: true
    ForEachMacros:
      - forever # avoids { wrapped to next line
      - foreach
      - Q_FOREACH
      - BOOST_FOREACH
    IncludeCategories:
      - Regex:           '^<Q.*'
        Priority:        200
    IncludeIsMainRegex: '(Test)?$'
    IndentCaseLabels: false
    IndentWidth:     4
    IndentWrappedFunctionNames: false
    JavaScriptQuotes: Leave
    JavaScriptWrapImports: true
    KeepEmptyLinesAtTheStartOfBlocks: false
    MacroBlockBegin: ""
    MacroBlockEnd:   ""
    MaxEmptyLinesToKeep: 1
    NamespaceIndentation: None
    ObjCBlockIndentWidth: 4
    ObjCSpaceAfterProperty: false
    ObjCSpaceBeforeProtocolList: true
    PenaltyBreakAssignment: 150
    PenaltyBreakBeforeFirstCallParameter: 300
    PenaltyBreakComment: 500
    PenaltyBreakFirstLessLess: 400
    PenaltyBreakString: 600
    PenaltyExcessCharacter: 50
    PenaltyReturnTypeOnItsOwnLine: 300
    PointerAlignment: Left
    ReflowComments:  true
    SortIncludes:    false
    SortUsingDeclarations: false
    SpaceAfterCStyleCast: true
    SpaceAfterTemplateKeyword: false
    SpaceBeforeAssignmentOperators: true
    SpaceBeforeCpp11BracedList: true
    SpaceBeforeParens: ControlStatements
    SpaceInEmptyParentheses: false
    SpacesBeforeTrailingComments: 1
    SpacesInAngles:  false
    SpacesInContainerLiterals: false
    SpacesInCStyleCastParentheses: false
    SpacesInParentheses: false
    SpacesInSquareBrackets: false
    Standard:        Cpp11
    TabWidth:        4
    UseTab:          Never