Skip to content

Commit 19b3f92

Browse files
committed
Clang format and updated priority_scheduling img
1 parent 3e32942 commit 19b3f92

11 files changed

+7373
-7099
lines changed

.clang-format

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

clang-format.bash

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
#!/usr/bin/env bash
2+
find ./include ./samples/ ./single_include -type f \( -iname \*.cpp -o -iname \*.h \) | xargs clang-format -style="{ColumnLimit : 100}" -i

img/priority_scheduling.png

-34.8 KB
Loading

0 commit comments

Comments
 (0)