# Copyright (C) 2019 Project Quotient # # You may use this file under the terms of the LGPL-2.1 license # See the file LICENSE from this package for details. # This is the clang-format configuration style to be used by libQuotient. # Inspired by: # https://code.qt.io/cgit/qt/qt5.git/plain/_clang-format # https://wiki.qt.io/Qt_Coding_Style # https://wiki.qt.io/Coding_Conventions # Further information: https://clang.llvm.org/docs/ClangFormatStyleOptions.html # For convenience, the file includes commented out settings that we assume # to borrow from the WebKit style. The values for such settings try to but # are not guaranteed to coincide with the latest version of the WebKit style. --- Language: Cpp BasedOnStyle: WebKit #AccessModifierOffset: -4 AlignAfterOpenBracket: Align #AlignConsecutiveAssignments: false #AlignConsecutiveDeclarations: false AlignEscapedNewlines: Left AlignOperands: true #AlignTrailingComments: false #AllowAllParametersOfDeclarationOnNextLine: true #AllowShortBlocksOnASingleLine: false #AllowShortCaseLabelsOnASingleLine: false #AllowShortFunctionsOnASingleLine: All #AllowShortIfStatementsOnASingleLine: false #AllowShortLoopsOnASingleLine: false #AlwaysBreakAfterReturnType: None #AlwaysBreakBeforeMultilineStrings: false #AlwaysBreakTemplateDeclarations: true #BinPackArguments: true #BinPackParameters: true BraceWrapping: AfterClass: true AfterControlStatement: false AfterEnum: true AfterFunction: true AfterNamespace: true AfterStruct: true AfterUnion: true AfterExternBlock: true BeforeCatch: false BeforeElse: false IndentBraces: false SplitEmptyFunction: false SplitEmptyRecord: false SplitEmptyNamespace: false BreakBeforeBinaryOperators: NonAssignment BreakBeforeBraces: Custom #BreakBeforeInheritanceComma: false #BreakInheritanceList: BeforeColon # Only supported since clang-format 7 #BreakBeforeTernaryOperators: true #BreakConstructorInitializersBeforeComma: false #BreakConstructorInitializers: BeforeComma #BreakStringLiterals: true ColumnLimit: 80 #CommentPragmas: '^!|^:' CompactNamespaces: false #ConstructorInitializerAllOnOneLineOrOnePerLine: false #ConstructorInitializerIndentWidth: 4 #ContinuationIndentWidth: 4 Cpp11BracedListStyle: false #DerivePointerAlignment: false FixNamespaceComments: true ForEachMacros: - foreach - Q_FOREACH - forever IncludeBlocks: Regroup IncludeCategories: - Regex: '^