Skip to content

Commit 22cf321

Browse files
committed
Import tools
1 parent 815fcd4 commit 22cf321

File tree

451 files changed

+173181
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

451 files changed

+173181
-0
lines changed

.clang-format

+145
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,145 @@
1+
---
2+
Language: Cpp
3+
AccessModifierOffset: -4
4+
AlignAfterOpenBracket: Align
5+
AlignConsecutiveAssignments: true
6+
AlignConsecutiveDeclarations: false
7+
AlignConsecutiveMacros: true
8+
AlignEscapedNewlines: Left
9+
AlignOperands: true
10+
AlignTrailingComments: false
11+
AllowAllArgumentsOnNextLine: false
12+
AllowAllConstructorInitializersOnNextLine: false
13+
AllowAllParametersOfDeclarationOnNextLine: false
14+
AllowShortBlocksOnASingleLine: false
15+
AllowShortCaseLabelsOnASingleLine: false
16+
AllowShortFunctionsOnASingleLine: Empty
17+
AllowShortIfStatementsOnASingleLine: Never
18+
AllowShortLambdasOnASingleLine: None
19+
AllowShortLoopsOnASingleLine: false
20+
AlwaysBreakAfterDefinitionReturnType: None
21+
AlwaysBreakAfterReturnType: None
22+
AlwaysBreakBeforeMultilineStrings: false
23+
AlwaysBreakTemplateDeclarations: true
24+
BinPackArguments: false
25+
BinPackParameters: false
26+
BraceWrapping:
27+
AfterCaseLabel: false
28+
AfterClass: false
29+
AfterControlStatement: false
30+
AfterEnum: false
31+
AfterFunction: false
32+
AfterNamespace: false
33+
AfterObjCDeclaration: false
34+
AfterStruct: false
35+
AfterUnion: false
36+
AfterExternBlock: false
37+
BeforeCatch: true
38+
BeforeElse: true
39+
IndentBraces: false
40+
SplitEmptyFunction: false
41+
SplitEmptyRecord: false
42+
SplitEmptyNamespace: false
43+
BreakBeforeBinaryOperators: None
44+
BreakBeforeBraces: Custom
45+
BreakBeforeTernaryOperators: true
46+
BreakConstructorInitializers: BeforeColon
47+
BreakInheritanceList: BeforeColon
48+
BreakStringLiterals: false
49+
ColumnLimit: 100
50+
CommentPragmas: '^ IWYU pragma:'
51+
CompactNamespaces: false
52+
ConstructorInitializerAllOnOneLineOrOnePerLine: true
53+
ConstructorInitializerIndentWidth: 8
54+
ContinuationIndentWidth: 4
55+
Cpp11BracedListStyle: false
56+
DerivePointerAlignment: false
57+
DisableFormat: false
58+
FixNamespaceComments: true
59+
ForEachMacros:
60+
- foreach
61+
- Q_FOREACH
62+
- BOOST_FOREACH
63+
IncludeBlocks: Preserve
64+
IncludeCategories:
65+
- Regex: '^<ext/.*\.h>'
66+
Priority: 2
67+
- Regex: '^<.*\.h>'
68+
Priority: 1
69+
- Regex: '^<.*'
70+
Priority: 2
71+
- Regex: '.*'
72+
Priority: 3
73+
IncludeIsMainRegex: '([-_](test|unittest))?$'
74+
IndentCaseLabels: true
75+
IndentPPDirectives: BeforeHash
76+
IndentWidth: 4
77+
IndentWrappedFunctionNames: false
78+
KeepEmptyLinesAtTheStartOfBlocks: false
79+
MacroBlockBegin: ''
80+
MacroBlockEnd: ''
81+
MaxEmptyLinesToKeep: 1
82+
NamespaceIndentation: None
83+
PenaltyBreakAssignment: 2
84+
PenaltyBreakBeforeFirstCallParameter: 1
85+
PenaltyBreakComment: 300
86+
PenaltyBreakFirstLessLess: 120
87+
PenaltyBreakString: 1000
88+
PenaltyBreakTemplateDeclaration: 10
89+
PenaltyExcessCharacter: 1000000
90+
PenaltyReturnTypeOnItsOwnLine: 200
91+
PointerAlignment: Right
92+
RawStringFormats:
93+
- Language: Cpp
94+
Delimiters:
95+
- cc
96+
- CC
97+
- cpp
98+
- Cpp
99+
- CPP
100+
- 'c++'
101+
- 'C++'
102+
CanonicalDelimiter: ''
103+
BasedOnStyle: google
104+
- Language: TextProto
105+
Delimiters:
106+
- pb
107+
- PB
108+
- proto
109+
- PROTO
110+
EnclosingFunctions:
111+
- EqualsProto
112+
- EquivToProto
113+
- PARSE_PARTIAL_TEXT_PROTO
114+
- PARSE_TEST_PROTO
115+
- PARSE_TEXT_PROTO
116+
- ParseTextOrDie
117+
- ParseTextProtoOrDie
118+
CanonicalDelimiter: ''
119+
BasedOnStyle: google
120+
ReflowComments: false
121+
SortIncludes: true
122+
SortUsingDeclarations: false
123+
SpaceAfterCStyleCast: false
124+
SpaceAfterLogicalNot: false
125+
SpaceAfterTemplateKeyword: true
126+
SpaceBeforeAssignmentOperators: true
127+
SpaceBeforeCpp11BracedList: false
128+
SpaceBeforeCtorInitializerColon: true
129+
SpaceBeforeInheritanceColon: true
130+
SpaceBeforeParens: ControlStatements
131+
SpaceBeforeRangeBasedForLoopColon: true
132+
SpaceInEmptyParentheses: false
133+
SpacesBeforeTrailingComments: 1
134+
SpacesInAngles: false
135+
SpacesInContainerLiterals: false
136+
SpacesInCStyleCastParentheses: false
137+
SpacesInParentheses: false
138+
SpacesInSquareBrackets: false
139+
Standard: Cpp11
140+
StatementMacros:
141+
- Q_UNUSED
142+
- QT_REQUIRE_VERSION
143+
TabWidth: 1
144+
UseTab: Never
145+
...

.cmake-format

+147
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,147 @@
1+
2+
# --------------------------
3+
# General Formatting Options
4+
# --------------------------
5+
# How wide to allow formatted cmake files
6+
line_width = 80
7+
8+
# How many spaces to tab for indent
9+
tab_size = 2
10+
11+
# If an argument group contains more than this many sub-groups (parg or kwarg
12+
# groups), then force it to a vertical layout.
13+
max_subgroups_hwrap = 2
14+
15+
# If a positional argument group contains more than this many arguments, then
16+
# force it to a vertical layout.
17+
max_pargs_hwrap = 6
18+
19+
# If true, separate flow control names from their parentheses with a space
20+
separate_ctrl_name_with_space = False
21+
22+
# If true, separate function names from parentheses with a space
23+
separate_fn_name_with_space = False
24+
25+
# If a statement is wrapped to more than one line, than dangle the closing
26+
# parenthesis on it's own line.
27+
dangle_parens = False
28+
29+
# If the trailing parenthesis must be 'dangled' on it's on line, then align it
30+
# to this reference: `prefix`: the start of the statement, `prefix-indent`: the
31+
# start of the statement, plus one indentation level, `child`: align to the
32+
# column of the arguments
33+
dangle_align = 'prefix'
34+
35+
min_prefix_chars = 4
36+
37+
# If the statement spelling length (including space and parenthesis) is larger
38+
# than the tab width by more than this amount, then force reject un-nested
39+
# layouts.
40+
max_prefix_chars = 10
41+
42+
# If a candidate layout is wrapped horizontally but it exceeds this many lines,
43+
# then reject the layout.
44+
max_lines_hwrap = 2
45+
46+
# What style line endings to use in the output.
47+
line_ending = 'unix'
48+
49+
# Format command names consistently as 'lower' or 'upper' case
50+
command_case = 'canonical'
51+
52+
# Format keywords consistently as 'lower' or 'upper' case
53+
keyword_case = 'unchanged'
54+
55+
# Specify structure for custom cmake functions
56+
additional_commands = {
57+
"foo": {
58+
"flags": [
59+
"BAR",
60+
"BAZ"
61+
],
62+
"kwargs": {
63+
"HEADERS": "*",
64+
"SOURCES": "*",
65+
"DEPENDS": "*"
66+
}
67+
}
68+
}
69+
70+
# A list of command names which should always be wrapped
71+
always_wrap = []
72+
73+
# If true, the argument lists which are known to be sortable will be sorted
74+
# lexicographicall
75+
enable_sort = True
76+
77+
# If true, the parsers may infer whether or not an argument list is sortable
78+
# (without annotation).
79+
autosort = False
80+
81+
# If a comment line starts with at least this many consecutive hash characters,
82+
# then don't lstrip() them off. This allows for lazy hash rulers where the first
83+
# hash char is not separated by space
84+
hashruler_min_length = 10
85+
86+
# By default, if cmake-format cannot successfully fit everything into the
87+
# desired linewidth it will apply the last, most agressive attempt that it made.
88+
# If this flag is True, however, cmake-format will print error, exit with non-
89+
# zero status code, and write-out nothing
90+
require_valid_layout = False
91+
92+
# A dictionary containing any per-command configuration overrides. Currently
93+
# only `command_case` is supported.
94+
per_command = {}
95+
96+
# A dictionary mapping layout nodes to a list of wrap decisions. See the
97+
# documentation for more information.
98+
layout_passes = {}
99+
100+
101+
# --------------------------
102+
# Comment Formatting Options
103+
# --------------------------
104+
# What character to use for bulleted lists
105+
bullet_char = '*'
106+
107+
# What character to use as punctuation after numerals in an enumerated list
108+
enum_char = '.'
109+
110+
# enable comment markup parsing and reflow
111+
enable_markup = True
112+
113+
# If comment markup is enabled, don't reflow the first comment block in each
114+
# listfile. Use this to preserve formatting of your copyright/license
115+
# statements.
116+
first_comment_is_literal = False
117+
118+
# If comment markup is enabled, don't reflow any comment block which matches
119+
# this (regex) pattern. Default is `None` (disabled).
120+
literal_comment_pattern = None
121+
122+
# Regular expression to match preformat fences in comments
123+
# default=r'^\s*([`~]{3}[`~]*)(.*)$'
124+
fence_pattern = '^\\s*([`~]{3}[`~]*)(.*)$'
125+
126+
# Regular expression to match rulers in comments
127+
# default=r'^\s*[^\w\s]{3}.*[^\w\s]{3}$'
128+
ruler_pattern = '^\\s*[^\\w\\s]{3}.*[^\\w\\s]{3}$'
129+
130+
# If true, then insert a space between the first hash char and remaining hash
131+
# chars in a hash ruler, and normalize it's length to fill the column
132+
canonicalize_hashrulers = True
133+
134+
135+
# ---------------------------------
136+
# Miscellaneous Options
137+
# ---------------------------------
138+
# If true, emit the unicode byte-order mark (BOM) at the start of the file
139+
emit_byteorder_mark = False
140+
141+
# Specify the encoding of the input file. Defaults to utf-8.
142+
input_encoding = 'utf-8'
143+
144+
# Specify the encoding of the output file. Defaults to utf-8. Note that cmake
145+
# only claims to support utf-8 so be careful when using anything else
146+
output_encoding = 'utf-8'
147+

.gitattributes

+3
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@ script/* eol=lf
1010

1111
# force lf endings for yaml
1212
*.yaml eol=lf
13+
*.yml eol=lf
14+
.clang-format eol=lf
1315

1416
# force encoding for json
1517
*.json encoding=utf-8
@@ -18,3 +20,4 @@ script/* eol=lf
1820
CMakeLists.* eol=lf
1921
*.cmake eol=lf
2022
*.cmake.in eol=lf
23+

0 commit comments

Comments
 (0)