|
| 1 | +# Copyright (c) 2016 Thomas Heller |
| 2 | +# Copyright (c) 2016-2018 Hartmut Kaiser |
| 3 | +# |
| 4 | +# SPDX-License-Identifier: BSL-1.0 |
| 5 | +# Distributed under the Boost Software License, Version 1.0. (See accompanying |
| 6 | +# file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) |
| 7 | + |
| 8 | +# This .clang-format file is a suggested configuration file for formatting |
| 9 | +# source code for the pika project. |
| 10 | +# |
| 11 | +# Here are a couple of guidelines of how to use this file. |
| 12 | +# |
| 13 | +# - You should use this file for creating an initial formatting for new files. |
| 14 | +# |
| 15 | +# - Please separate edits which are pure formatting into isolated commits |
| 16 | +# keeping those distinct from edits changing any of the code. |
| 17 | +# |
| 18 | +# - Please do _not_ configure your editor to automatically format the source |
| 19 | +# file while saving edits to disk |
| 20 | +# - Please do _not_ reformat a full source file without dire need. |
| 21 | + |
| 22 | +# PLEASE NOTE: This file requires clang-format V18.0 |
| 23 | + |
| 24 | +--- |
| 25 | +AccessModifierOffset: -4 |
| 26 | +AlignAfterOpenBracket: DontAlign |
| 27 | +AlignConsecutiveAssignments: false |
| 28 | +AlignConsecutiveDeclarations: false |
| 29 | +AlignEscapedNewlines: Right |
| 30 | +AlignOperands: false |
| 31 | +AlignTrailingComments: true |
| 32 | +AllowAllParametersOfDeclarationOnNextLine: false |
| 33 | +AllowShortBlocksOnASingleLine: Always |
| 34 | +AllowShortCaseLabelsOnASingleLine: true |
| 35 | +AllowShortEnumsOnASingleLine: true |
| 36 | +AllowShortFunctionsOnASingleLine: All |
| 37 | +AllowShortIfStatementsOnASingleLine: WithoutElse |
| 38 | +AllowShortLambdasOnASingleLine: All |
| 39 | +AllowShortLoopsOnASingleLine: true |
| 40 | +AlwaysBreakAfterDefinitionReturnType: None |
| 41 | +AlwaysBreakAfterReturnType: None |
| 42 | +AlwaysBreakBeforeMultilineStrings: false |
| 43 | +AlwaysBreakTemplateDeclarations: true |
| 44 | +BinPackArguments: true |
| 45 | +BinPackParameters: true |
| 46 | +BraceWrapping: |
| 47 | + AfterCaseLabel: true |
| 48 | + AfterClass: true |
| 49 | + AfterControlStatement: true |
| 50 | + AfterEnum: true |
| 51 | + AfterFunction: true |
| 52 | + AfterNamespace: false |
| 53 | + AfterStruct: true |
| 54 | + AfterUnion: true |
| 55 | + BeforeCatch: true |
| 56 | + BeforeElse: true |
| 57 | + IndentBraces: false |
| 58 | +BreakAfterAttributes: Leave |
| 59 | +BreakBeforeBinaryOperators: None |
| 60 | +BreakBeforeBraces: Custom |
| 61 | +BreakBeforeInheritanceComma: true |
| 62 | +BreakBeforeInlineASMColon: OnlyMultiline |
| 63 | +BreakBeforeTernaryOperators: false |
| 64 | +BreakConstructorInitializersBeforeComma: true |
| 65 | +BreakStringLiterals: true |
| 66 | +ColumnLimit: 100 |
| 67 | +CommentPragmas: "///" |
| 68 | +CompactNamespaces: true |
| 69 | +ConstructorInitializerAllOnOneLineOrOnePerLine: false |
| 70 | +ConstructorInitializerIndentWidth: 2 |
| 71 | +ContinuationIndentWidth: 4 |
| 72 | +Cpp11BracedListStyle: true |
| 73 | +DerivePointerAlignment: false |
| 74 | +#ExperimentalAutoDetectBinPacking: true # Do weird reformatting |
| 75 | +FixNamespaceComments: true |
| 76 | +# ForEachMacros: [''] |
| 77 | +IncludeCategories: |
| 78 | + - Regex: '^<pika/config\.hpp>' |
| 79 | + Priority: 1 |
| 80 | + - Regex: '^<pika/config/defines\.hpp>' |
| 81 | + Priority: 2 |
| 82 | + - Regex: '^<pika/.*/config\.hpp>' |
| 83 | + Priority: 3 |
| 84 | + - Regex: '^<pika/.*\.hpp>' |
| 85 | + Priority: 4 |
| 86 | + - Regex: '^<pika/parallel/.*\.hpp>' |
| 87 | + Priority: 5 |
| 88 | + - Regex: '^<.*' |
| 89 | + Priority: 6 |
| 90 | + - Regex: '.*' |
| 91 | + Priority: 7 |
| 92 | +# IncludeIsMainRegex: '' |
| 93 | +IndentCaseLabels: false |
| 94 | +IndentWidth: 4 |
| 95 | +IndentWrappedFunctionNames: false |
| 96 | +IndentPPDirectives: AfterHash |
| 97 | +InsertBraces: false |
| 98 | +IntegerLiteralSeparator: |
| 99 | + Binary: 4 |
| 100 | + Decimal: 0 |
| 101 | + Hex: 4 |
| 102 | +KeepEmptyLinesAtTheStartOfBlocks: false |
| 103 | +Language: Cpp |
| 104 | +# MacroBlockBegin: '' |
| 105 | +# MacroBlockEnd: '' |
| 106 | +MaxEmptyLinesToKeep: 1 |
| 107 | +NamespaceIndentation: All |
| 108 | +PenaltyBreakBeforeFirstCallParameter: 1 |
| 109 | +PenaltyBreakComment: 300 |
| 110 | +PenaltyBreakFirstLessLess: 120 |
| 111 | +PenaltyBreakString: 1000 |
| 112 | +PenaltyExcessCharacter: 1000000 |
| 113 | +PenaltyReturnTypeOnItsOwnLine: 20 |
| 114 | +PointerAlignment: Left |
| 115 | +PPIndentWidth: 1 |
| 116 | +ReflowComments: false |
| 117 | +QualifierAlignment: Right |
| 118 | +RequiresClausePosition: OwnLine |
| 119 | +RequiresExpressionIndentation: OuterScope |
| 120 | +SortIncludes: true |
| 121 | +SpaceAfterCStyleCast: true |
| 122 | +SpaceAfterTemplateKeyword: true |
| 123 | +SpaceBeforeAssignmentOperators: true |
| 124 | +SpaceBeforeParens: ControlStatements |
| 125 | +SpaceInEmptyParentheses: false |
| 126 | +SpacesBeforeTrailingComments: 4 |
| 127 | +SpacesInAngles: false |
| 128 | +SpacesInCStyleCastParentheses: false |
| 129 | +SpacesInContainerLiterals: false |
| 130 | +SpacesInParentheses: false |
| 131 | +SpacesInSquareBrackets: false |
| 132 | +Standard: Cpp11 |
| 133 | +TabWidth: 4 |
| 134 | +UseTab: Never |
| 135 | +... |
0 commit comments