Skip to content

Commit 7538e45

Browse files
committed
clang-format config file.
Best to use with clang-format-7 and git-clang-format-7. Not obligatory to use, just a common copy so that people who use it use the same rules. git-svn-id: http://svn.osgeo.org/postgis/trunk@16953 b70326c6-7e19-0410-871a-916f4a2858ee
1 parent 3233ccd commit 7538e45

File tree

1 file changed

+110
-0
lines changed

1 file changed

+110
-0
lines changed

.clang-format

Lines changed: 110 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,110 @@
1+
---
2+
Language: Cpp
3+
AccessModifierOffset: -2
4+
AlignAfterOpenBracket: Align
5+
AlignConsecutiveAssignments: false
6+
AlignConsecutiveDeclarations: false
7+
AlignEscapedNewlines: DontAlign
8+
AlignOperands: true
9+
AlignTrailingComments: true
10+
AllowAllParametersOfDeclarationOnNextLine: false
11+
AllowShortBlocksOnASingleLine: true
12+
AllowShortCaseLabelsOnASingleLine: false
13+
AllowShortFunctionsOnASingleLine: Inline
14+
AllowShortIfStatementsOnASingleLine: false
15+
AllowShortLoopsOnASingleLine: false
16+
AlwaysBreakAfterDefinitionReturnType: None
17+
AlwaysBreakAfterReturnType: TopLevelDefinitions
18+
AlwaysBreakBeforeMultilineStrings: true
19+
AlwaysBreakTemplateDeclarations: false
20+
BinPackArguments: false
21+
BinPackParameters: false
22+
BraceWrapping:
23+
AfterClass: false
24+
AfterControlStatement: true
25+
AfterEnum: true
26+
AfterFunction: true
27+
AfterNamespace: false
28+
AfterObjCDeclaration: false
29+
AfterStruct: true
30+
AfterUnion: false
31+
AfterExternBlock: false
32+
BeforeCatch: true
33+
BeforeElse: true
34+
IndentBraces: false
35+
SplitEmptyFunction: false
36+
SplitEmptyRecord: false
37+
SplitEmptyNamespace: false
38+
BreakBeforeBinaryOperators: None
39+
BreakBeforeBraces: Custom
40+
BreakBeforeInheritanceComma: false
41+
BreakBeforeTernaryOperators: true
42+
BreakConstructorInitializersBeforeComma: false
43+
BreakConstructorInitializers: BeforeColon
44+
BreakAfterJavaFieldAnnotations: false
45+
BreakStringLiterals: false
46+
ColumnLimit: 120
47+
CommentPragmas: '^ IWYU pragma:'
48+
CompactNamespaces: false
49+
ConstructorInitializerAllOnOneLineOrOnePerLine: false
50+
ConstructorInitializerIndentWidth: 4
51+
ContinuationIndentWidth: 4
52+
Cpp11BracedListStyle: true
53+
DerivePointerAlignment: false
54+
DisableFormat: false
55+
ExperimentalAutoDetectBinPacking: false
56+
FixNamespaceComments: true
57+
ForEachMacros:
58+
- foreach
59+
- Q_FOREACH
60+
- BOOST_FOREACH
61+
IncludeBlocks: Preserve
62+
IncludeCategories:
63+
- Regex: '^"(llvm|llvm-c|clang|clang-c)/'
64+
Priority: 2
65+
- Regex: '^(<|"(gtest|gmock|isl|json)/)'
66+
Priority: 3
67+
- Regex: '.*'
68+
Priority: 1
69+
IncludeIsMainRegex: '(Test)?$'
70+
IndentCaseLabels: false
71+
IndentPPDirectives: None
72+
IndentWidth: 8
73+
IndentWrappedFunctionNames: false
74+
JavaScriptQuotes: Leave
75+
JavaScriptWrapImports: true
76+
KeepEmptyLinesAtTheStartOfBlocks: true
77+
MacroBlockBegin: ''
78+
MacroBlockEnd: ''
79+
MaxEmptyLinesToKeep: 1
80+
NamespaceIndentation: None
81+
ObjCBlockIndentWidth: 2
82+
ObjCSpaceAfterProperty: false
83+
ObjCSpaceBeforeProtocolList: true
84+
PenaltyBreakAssignment: 2
85+
PenaltyBreakBeforeFirstCallParameter: 19
86+
PenaltyBreakComment: 300
87+
PenaltyBreakFirstLessLess: 120
88+
PenaltyBreakString: 1000
89+
PenaltyExcessCharacter: 1000000
90+
PenaltyReturnTypeOnItsOwnLine: 60
91+
PointerAlignment: Right
92+
ReflowComments: true
93+
SortIncludes: false
94+
SortUsingDeclarations: true
95+
SpaceAfterCStyleCast: false
96+
SpaceAfterTemplateKeyword: true
97+
SpaceBeforeAssignmentOperators: true
98+
SpaceBeforeParens: ControlStatements
99+
SpaceInEmptyParentheses: false
100+
SpacesBeforeTrailingComments: 1
101+
SpacesInAngles: false
102+
SpacesInContainerLiterals: true
103+
SpacesInCStyleCastParentheses: false
104+
SpacesInParentheses: false
105+
SpacesInSquareBrackets: false
106+
Standard: Cpp11
107+
TabWidth: 8
108+
UseTab: ForContinuationAndIndentation
109+
...
110+

0 commit comments

Comments
 (0)