# SPDX-FileCopyrightText: 2019 Kitsune Ral # SPDX-FileCopyrightText: 2019 Marc Deop # SPDX-License-Identifier: LGPL-2.1-or-later # 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. # This file assumes ClangFormat 12 or newer --- Language: Cpp BasedOnStyle: WebKit #AccessModifierOffset: -4 AlignAfterOpenBracket: Align #AlignArrayOfStructures: None # ClangFormat 13 #AlignConsecutiveMacros: None #AlignConsecutiveAssignments: None #AlignConsecutiveDeclarations: None AlignEscapedNewlines: Left AlignOperands: Align #AlignTrailingComments: false #AllowAllArgumentsOnNextLine: true AllowAllConstructorInitializersOnNextLine: true #AllowAllParametersOfDeclarationOnNextLine: true #AllowShortEnumsOnASingleLine: true #AllowShortBlocksOnASingleLine: Empty AllowShortCaseLabelsOnASingleLine: true #AllowShortFunctionsOnASingleLine: All #AllowShortLambdasOnASingleLine: All #AllowShortIfStatementsOnASingleLine: Never #AllowShortLoopsOnASingleLine: false #AlwaysBreakAfterDefinitionReturnType: None # deprecated #AlwaysBreakAfterReturnType: None #AlwaysBreakBeforeMultilineStrings: false AlwaysBreakTemplateDeclarations: Yes #AttributeMacros: # - __capability #BinPackArguments: true #BinPackParameters: true BraceWrapping: # AfterCaseLabel: false # AfterClass: false AfterControlStatement: Never # Switch to MultiLine with ClangFormat 14 (https://bugs.llvm.org/show_bug.cgi?id=47936) # AfterEnum: false AfterFunction: true # AfterNamespace: false # AfterStruct: false # AfterUnion: false # AfterExternBlock: false # BeforeCatch: false # BeforeElse: false # BeforeLambdaBody: false # Blows up lambdas vertically, even if they become _very_ readable # BeforeWhile: false # IndentBraces: false SplitEmptyFunction: false SplitEmptyRecord: false SplitEmptyNamespace: false BreakBeforeBinaryOperators: NonAssignment #BreakBeforeConceptDeclarations: true BreakBeforeBraces: Custom #BreakBeforeInheritanceComma: false # deprecated? #BreakInheritanceList: BeforeColon #BreakBeforeTernaryOperators: true #BreakConstructorInitializersBeforeComma: false # deprecated? #BreakConstructorInitializers: BeforeComma #BreakStringLiterals: true ColumnLimit: 80 #QualifierAlignment: Leave # ClangFormat 14? #CompactNamespaces: false ConstructorInitializerAllOnOneLineOrOnePerLine: true #ConstructorInitializerIndentWidth: 4 #ContinuationIndentWidth: 4 #Cpp11BracedListStyle: true #DeriveLineEnding: true #DerivePointerAlignment: false #EmptyLineAfterAccessModifier: Never # ClangFormat 14 EmptyLineBeforeAccessModifier: Always #FixNamespaceComments: false # See ShortNamespaces below IncludeBlocks: Regroup IncludeCategories: - Regex: '^