|
1 |
| -# Clang-format configuration for Zeek. This configuration requires |
2 |
| -# at least clang-format 12.0.1 to format correctly. |
3 |
| - |
4 |
| -Language: Cpp |
5 |
| -Standard: c++17 |
6 |
| - |
7 |
| -BreakBeforeBraces: Whitesmiths |
8 |
| - |
9 |
| -# BraceWrapping: |
10 |
| -# AfterCaseLabel: true |
11 |
| -# AfterClass: false |
12 |
| -# AfterControlStatement: Always |
13 |
| -# AfterEnum: false |
14 |
| -# AfterFunction: true |
15 |
| -# AfterNamespace: false |
16 |
| -# AfterStruct: false |
17 |
| -# AfterUnion: false |
18 |
| -# AfterExternBlock: false |
19 |
| -# BeforeCatch: true |
20 |
| -# BeforeElse: true |
21 |
| -# BeforeWhile: false |
22 |
| -# IndentBraces: true |
23 |
| -# SplitEmptyFunction: false |
24 |
| -# SplitEmptyRecord: false |
25 |
| -# SplitEmptyNamespace: false |
| 1 | +# Copyright (c) 2020-2023 by the Zeek Project. See LICENSE for details. |
26 | 2 |
|
| 3 | +--- |
| 4 | +Language: Cpp |
27 | 5 | AccessModifierOffset: -4
|
28 | 6 | AlignAfterOpenBracket: Align
|
29 |
| -AlignTrailingComments: false |
30 |
| -AllowShortBlocksOnASingleLine: Empty |
31 |
| -AllowShortEnumsOnASingleLine: true |
32 |
| -AllowShortFunctionsOnASingleLine: Inline |
| 7 | +AlignConsecutiveAssignments: false |
| 8 | +AlignConsecutiveDeclarations: false |
| 9 | +AlignEscapedNewlines: Right |
| 10 | +AlignOperands: true |
| 11 | +AlignTrailingComments: true |
| 12 | +AllowAllParametersOfDeclarationOnNextLine: false |
| 13 | +AllowShortBlocksOnASingleLine: false |
| 14 | +AllowShortCaseLabelsOnASingleLine: true |
| 15 | +AllowShortFunctionsOnASingleLine: true |
33 | 16 | AllowShortIfStatementsOnASingleLine: false
|
34 |
| -AllowShortLambdasOnASingleLine: Empty |
35 | 17 | AllowShortLoopsOnASingleLine: false
|
| 18 | +AlwaysBreakAfterDefinitionReturnType: None |
36 | 19 | AlwaysBreakAfterReturnType: None
|
| 20 | +AlwaysBreakBeforeMultilineStrings: true |
| 21 | +AlwaysBreakTemplateDeclarations: Yes |
37 | 22 | BinPackArguments: true
|
38 | 23 | BinPackParameters: true
|
39 |
| -BreakConstructorInitializers: BeforeColon |
| 24 | +BraceWrapping: |
| 25 | + AfterClass: false |
| 26 | + AfterControlStatement: false |
| 27 | + AfterEnum: false |
| 28 | + AfterFunction: false |
| 29 | + AfterNamespace: false |
| 30 | + AfterObjCDeclaration: false |
| 31 | + AfterStruct: false |
| 32 | + AfterUnion: false |
| 33 | + AfterExternBlock: false |
| 34 | + BeforeCatch: false |
| 35 | + BeforeElse: true |
| 36 | + IndentBraces: false |
| 37 | + SplitEmptyFunction: false |
| 38 | + SplitEmptyRecord: false |
| 39 | + SplitEmptyNamespace: false |
| 40 | +BreakBeforeBinaryOperators: None |
| 41 | +BreakBeforeBraces: Custom |
| 42 | +BreakBeforeInheritanceComma: false |
40 | 43 | BreakInheritanceList: BeforeColon
|
41 |
| -ColumnLimit: 100 |
42 |
| -ConstructorInitializerAllOnOneLineOrOnePerLine: false |
43 |
| -FixNamespaceComments: false |
44 |
| -IndentCaseLabels: true |
45 |
| -IndentCaseBlocks: false |
46 |
| -IndentExternBlock: NoIndent |
47 |
| -IndentPPDirectives: None |
48 |
| -IndentWidth: 4 |
49 |
| -NamespaceIndentation: None |
50 |
| -PointerAlignment: Left |
51 |
| -SpaceAfterCStyleCast: false |
52 |
| -SpaceAfterLogicalNot: true |
53 |
| -SpaceBeforeAssignmentOperators: true |
54 |
| -SpaceBeforeCpp11BracedList: false |
55 |
| -SpaceBeforeCtorInitializerColon: true |
56 |
| -SpaceBeforeInheritanceColon: true |
57 |
| -SpaceBeforeParens: ControlStatements |
58 |
| -SpaceBeforeRangeBasedForLoopColon: true |
59 |
| -SpaceInEmptyBlock: true |
60 |
| -SpaceInEmptyParentheses: false |
61 |
| -SpacesInAngles: false |
62 |
| -SpacesInConditionalStatement: true |
63 |
| -SpacesInContainerLiterals: false |
64 |
| -SpacesInParentheses: false |
65 |
| -TabWidth: 4 |
66 |
| -UseTab: AlignWithSpaces |
67 |
| - |
68 |
| -# Setting this to a high number causes clang-format to prefer breaking somewhere else |
69 |
| -# over breaking after the assignment operator in a line that's over the column limit |
70 |
| -PenaltyBreakAssignment: 100 |
71 |
| - |
| 44 | +BreakBeforeTernaryOperators: false |
| 45 | +BreakConstructorInitializersBeforeComma: false |
| 46 | +BreakConstructorInitializers: BeforeColon |
| 47 | +BreakAfterJavaFieldAnnotations: false |
| 48 | +BreakStringLiterals: true |
| 49 | +ColumnLimit: 120 |
| 50 | +CommentPragmas: 'NOLINT' |
| 51 | +CompactNamespaces: false |
| 52 | +ConstructorInitializerAllOnOneLineOrOnePerLine: true |
| 53 | +ConstructorInitializerIndentWidth: 4 |
| 54 | +ContinuationIndentWidth: 4 |
| 55 | +Cpp11BracedListStyle: true |
| 56 | +DerivePointerAlignment: false |
| 57 | +DisableFormat: false |
| 58 | +ExperimentalAutoDetectBinPacking: false |
| 59 | +FixNamespaceComments: true |
| 60 | +ForEachMacros: |
| 61 | + - foreach |
| 62 | + - Q_FOREACH |
| 63 | + - BOOST_FOREACH |
72 | 64 | IncludeBlocks: Regroup
|
73 | 65 |
|
74 | 66 | # Include categories go like this:
|
@@ -98,3 +90,57 @@ IncludeCategories:
|
98 | 90 | Priority: 4
|
99 | 91 | - Regex: '.*'
|
100 | 92 | Priority: 5
|
| 93 | + |
| 94 | +IncludeIsMainRegex: '$' |
| 95 | +IndentCaseLabels: true |
| 96 | +IndentPPDirectives: None |
| 97 | +IndentWidth: 4 |
| 98 | +IndentWrappedFunctionNames: false |
| 99 | +JavaScriptQuotes: Leave |
| 100 | +JavaScriptWrapImports: true |
| 101 | +KeepEmptyLinesAtTheStartOfBlocks: false |
| 102 | +MacroBlockBegin: '^BEGIN_' |
| 103 | +MacroBlockEnd: '^END_' |
| 104 | +MaxEmptyLinesToKeep: 2 |
| 105 | +NamespaceIndentation: None |
| 106 | +ObjCBinPackProtocolList: Auto |
| 107 | +ObjCBlockIndentWidth: 2 |
| 108 | +ObjCSpaceAfterProperty: false |
| 109 | +ObjCSpaceBeforeProtocolList: true |
| 110 | +PenaltyBreakAssignment: 2 |
| 111 | +PenaltyBreakBeforeFirstCallParameter: 500 |
| 112 | +PenaltyBreakComment: 300 |
| 113 | +PenaltyBreakFirstLessLess: 120 |
| 114 | +PenaltyBreakString: 1000 |
| 115 | +PenaltyBreakTemplateDeclaration: 10 |
| 116 | +PenaltyExcessCharacter: 1000000 |
| 117 | +PenaltyReturnTypeOnItsOwnLine: 1000 |
| 118 | +PointerAlignment: Left |
| 119 | +ReflowComments: true |
| 120 | +SortIncludes: true |
| 121 | +SortUsingDeclarations: true |
| 122 | +SpaceAfterCStyleCast: false |
| 123 | +SpaceAfterTemplateKeyword: false |
| 124 | +SpaceAfterLogicalNot: true |
| 125 | +SpaceBeforeAssignmentOperators: true |
| 126 | +SpaceBeforeCpp11BracedList: false |
| 127 | +SpaceBeforeCtorInitializerColon: true |
| 128 | +SpaceBeforeInheritanceColon: true |
| 129 | +SpaceBeforeParens: ControlStatements |
| 130 | +SpaceBeforeRangeBasedForLoopColon: true |
| 131 | +SpaceInEmptyParentheses: false |
| 132 | +SpacesBeforeTrailingComments: 1 |
| 133 | +SpacesInAngles: false |
| 134 | +SpacesInContainerLiterals: true |
| 135 | +SpacesInCStyleCastParentheses: false |
| 136 | +SpacesInParentheses: false |
| 137 | +SpacesInSquareBrackets: false |
| 138 | +SpacesInConditionalStatement: true |
| 139 | +Standard: Cpp11 |
| 140 | +StatementMacros: |
| 141 | + - STANDARD_OPERATOR_1 |
| 142 | +TabWidth: 4 |
| 143 | +UseTab: Never |
| 144 | +--- |
| 145 | +Language: Json |
| 146 | +... |
0 commit comments