source: mainline/.clang-format@ be913d78

Last change on this file since be913d78 was be913d78, checked in by Jiří Zárevúcky <zarevucky.jiri@…>, 4 years ago

Whittle down further

  • Property mode set to 100644
File size: 3.6 KB
Line 
1#
2# SPDX-FileCopyrightText: 2022 HelenOS Project
3# SPDX-License-Identifier: CC0-1.0
4#
5#
6# This format definition attempts to be as close to the style of existing
7# HelenOS code as possible. However, there are several significant issues:
8#
9# "AlignEscapedNewlines: DontAlign" currently hangs
10# the formatter on some files.
11#
12# The formatter currently isn't able to align macro definitions,
13# and removes existing alignment in files.
14# (There is a patch for this, but it hasn't been integrated yet.)
15#
16# SpacesBeforeTrailingComments don't apply to C-style comments.
17#
18# enum definition is always crammed into a single line if it fits,
19# and there is no option to put members on separate lines.
20#
21# Possibly others.
22#
23#
24# Provisions are made to reformat the entire source tree via 'make format',
25# but due to the above, this shouldn't be done except to evaluate the
26# impact. Reformatting a single source file can be done using
27#
28# clang-format -i source/file.c
29#
30---
31Language: Cpp
32BasedOnStyle: LLVM
33AccessModifierOffset: 0
34AlignAfterOpenBracket: DontAlign
35AlignConsecutiveAssignments: false
36AlignConsecutiveDeclarations: false
37AlignEscapedNewlines: Left
38AlignOperands: false
39AlignTrailingComments: true
40AllowAllParametersOfDeclarationOnNextLine: true
41AllowShortBlocksOnASingleLine: false
42AllowShortCaseLabelsOnASingleLine: false
43AllowShortFunctionsOnASingleLine: None
44AllowShortIfStatementsOnASingleLine: false
45AllowShortLoopsOnASingleLine: false
46AlwaysBreakAfterDefinitionReturnType: None
47AlwaysBreakAfterReturnType: None
48AlwaysBreakBeforeMultilineStrings: false
49AlwaysBreakTemplateDeclarations: true
50BinPackArguments: true
51BinPackParameters: true
52BraceWrapping:
53 AfterClass: false
54 AfterControlStatement: false
55 AfterEnum: false
56 AfterFunction: true
57 AfterNamespace: false
58 AfterObjCDeclaration: false
59 AfterStruct: false
60 AfterUnion: false
61 BeforeCatch: false
62 BeforeElse: false
63 IndentBraces: false
64 SplitEmptyFunction: true
65 SplitEmptyRecord: true
66 SplitEmptyNamespace: true
67BreakBeforeBinaryOperators: NonAssignment
68BreakBeforeBraces: Custom
69BreakBeforeInheritanceComma: true
70BreakBeforeTernaryOperators: true
71BreakConstructorInitializers: BeforeColon
72BreakStringLiterals: true
73ColumnLimit: 80
74CompactNamespaces: false
75ConstructorInitializerAllOnOneLineOrOnePerLine: false
76ConstructorInitializerIndentWidth: 4
77ContinuationIndentWidth: 4
78Cpp11BracedListStyle: true
79DerivePointerAlignment: false
80FixNamespaceComments: true
81ForEachMacros:
82 - foreach
83 - Q_FOREACH
84 - BOOST_FOREACH
85IncludeCategories:
86 - Regex: '^"'
87 Priority: 3
88 - Regex: '^<'
89 Priority: 2
90 - Regex: '.*'
91 Priority: 1
92IncludeIsMainRegex: '(-test)?$'
93IndentCaseLabels: false
94IndentWidth: 8
95IndentWrappedFunctionNames: false
96KeepEmptyLinesAtTheStartOfBlocks: true
97MacroBlockBegin: ''
98MacroBlockEnd: ''
99MaxEmptyLinesToKeep: 1
100NamespaceIndentation: None
101PenaltyBreakAssignment: 2
102PenaltyBreakBeforeFirstCallParameter: 19
103PenaltyBreakComment: 300
104PenaltyBreakFirstLessLess: 120
105PenaltyBreakString: 1000
106PenaltyExcessCharacter: 1000000
107PenaltyReturnTypeOnItsOwnLine: 60
108PointerAlignment: Right
109ReflowComments: true
110SortIncludes: true
111SortUsingDeclarations: true
112SpaceAfterCStyleCast: true
113SpaceAfterTemplateKeyword: false
114SpaceBeforeAssignmentOperators: true
115SpaceBeforeParens: ControlStatements
116SpaceInEmptyParentheses: false
117SpacesBeforeTrailingComments: 2
118SpacesInAngles: false
119SpacesInContainerLiterals: false
120SpacesInCStyleCastParentheses: false
121SpacesInParentheses: false
122SpacesInSquareBrackets: false
123Standard: Cpp11
124TabWidth: 8
125UseTab: ForIndentation
126...
127
Note: See TracBrowser for help on using the repository browser.