Skip to content

Commit 519c9db

Browse files
committed
Add formatter files
1 parent 5518388 commit 519c9db

File tree

2 files changed

+153
-0
lines changed

2 files changed

+153
-0
lines changed

.clang-format

Lines changed: 84 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,84 @@
1+
---
2+
AlignAfterOpenBracket: DontAlign
3+
AlignConsecutiveMacros: 'true'
4+
AlignConsecutiveAssignments: 'false'
5+
AlignConsecutiveDeclarations: 'false'
6+
AlignEscapedNewlines: DontAlign
7+
AlignOperands: 'true'
8+
AlignTrailingComments: 'true'
9+
AllowAllArgumentsOnNextLine: 'true'
10+
AllowAllConstructorInitializersOnNextLine: 'false'
11+
AllowAllParametersOfDeclarationOnNextLine: 'false'
12+
AllowShortBlocksOnASingleLine: 'false'
13+
AllowShortCaseLabelsOnASingleLine: 'false'
14+
AllowShortFunctionsOnASingleLine: Inline
15+
AllowShortIfStatementsOnASingleLine: Never
16+
AllowShortLambdasOnASingleLine: Inline
17+
AllowShortLoopsOnASingleLine: 'false'
18+
AlwaysBreakAfterDefinitionReturnType: None
19+
AlwaysBreakAfterReturnType: None
20+
AlwaysBreakBeforeMultilineStrings: 'true'
21+
AlwaysBreakTemplateDeclarations: 'Yes'
22+
BinPackArguments: 'true'
23+
BinPackParameters: 'true'
24+
BreakBeforeBraces: Custom
25+
BraceWrapping:
26+
AfterCaseLabel: 'true'
27+
AfterClass: 'true'
28+
AfterControlStatement: 'true'
29+
AfterEnum: 'true'
30+
AfterFunction: 'true'
31+
AfterNamespace: 'false'
32+
AfterObjCDeclaration: 'true'
33+
AfterStruct: 'true'
34+
AfterUnion: 'true'
35+
AfterExternBlock: 'true'
36+
BeforeCatch: 'true'
37+
BeforeElse: 'true'
38+
IndentBraces: 'false'
39+
SplitEmptyFunction: 'false'
40+
SplitEmptyRecord: 'false'
41+
SplitEmptyNamespace: 'false'
42+
BreakBeforeBinaryOperators: NonAssignment
43+
BreakBeforeTernaryOperators: 'false'
44+
BreakConstructorInitializers: AfterColon
45+
BreakInheritanceList: AfterColon
46+
ColumnLimit: '120'
47+
CompactNamespaces: 'true'
48+
ConstructorInitializerAllOnOneLineOrOnePerLine: 'false'
49+
Cpp11BracedListStyle: 'true'
50+
DerivePointerAlignment: 'false'
51+
DisableFormat: 'false'
52+
EmptyLineBeforeAccessModifier: Always
53+
FixNamespaceComments: 'true'
54+
IncludeBlocks: Preserve
55+
IndentCaseLabels: 'false'
56+
IndentPPDirectives: BeforeHash
57+
IndentWrappedFunctionNames: 'true'
58+
KeepEmptyLinesAtTheStartOfBlocks: 'false'
59+
MaxEmptyLinesToKeep: '2'
60+
NamespaceIndentation: All
61+
PointerAlignment: Left
62+
SortIncludes: 'false'
63+
SortUsingDeclarations: 'true'
64+
SpaceAfterCStyleCast: 'false'
65+
SpaceAfterLogicalNot: 'false'
66+
SpaceAfterTemplateKeyword: 'true'
67+
SpaceBeforeAssignmentOperators: 'true'
68+
SpaceBeforeCpp11BracedList: 'true'
69+
SpaceBeforeCtorInitializerColon: 'true'
70+
SpaceBeforeInheritanceColon: 'true'
71+
SpaceBeforeParens: ControlStatements
72+
SpaceBeforeRangeBasedForLoopColon: 'true'
73+
SpaceInEmptyParentheses: 'false'
74+
SpacesBeforeTrailingComments: '2'
75+
SpacesInAngles: 'false'
76+
SpacesInCStyleCastParentheses: 'false'
77+
SpacesInContainerLiterals: 'false'
78+
SpacesInParentheses: 'false'
79+
SpacesInSquareBrackets: 'false'
80+
IndentWidth: '4'
81+
TabWidth: '4'
82+
UseTab: ForIndentation
83+
84+
...

.style.yapf

Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
[style]
2+
3+
align_closing_bracket_with_visual_indent=True
4+
allow_multiline_dictionary_keys=False
5+
allow_multiline_lambdas=False
6+
allow_split_before_default_or_named_assigns=False
7+
allow_split_before_dict_value=True
8+
arithmetic_precedence_indication=True
9+
blank_lines_around_top_level_definition=2
10+
blank_lines_between_top_level_imports_and_variables=1
11+
blank_line_before_class_docstring=False
12+
blank_line_before_module_docstring=False
13+
blank_line_before_nested_class_or_def=False
14+
coalesce_brackets=True
15+
column_limit=120
16+
continuation_align_style=SPACE
17+
continuation_indent_width=4
18+
dedent_closing_brackets=True
19+
disable_ending_comma_heuristic=True
20+
each_dict_entry_on_separate_line=False
21+
force_multiline_dict=False
22+
indent_blank_lines=False
23+
indent_closing_brackets=False
24+
indent_dictionary_value=True
25+
indent_width=4
26+
join_multiple_lines=False
27+
spaces_around_default_or_named_assign=False
28+
spaces_around_dict_delimiters=False
29+
spaces_around_list_delimiters=False
30+
spaces_around_power_operator=False
31+
spaces_around_subscript_colon=False
32+
spaces_around_tuple_delimiters=False
33+
spaces_before_comment=2
34+
space_between_ending_comma_and_closing_bracket=True
35+
space_inside_brackets=False
36+
split_all_comma_separated_values=False
37+
split_all_top_level_comma_separated_values=False
38+
split_arguments_when_comma_terminated=False
39+
split_before_arithmetic_operator=True
40+
split_before_bitwise_operator=True
41+
split_before_closing_bracket=True
42+
split_before_dict_set_generator=True
43+
split_before_dot=False
44+
split_before_expression_after_opening_paren=False
45+
split_before_first_argument=False
46+
split_before_logical_operator=True
47+
split_before_named_assigns=False
48+
split_complex_comprehension=False
49+
split_penalty_after_opening_bracket=300
50+
split_penalty_after_unary_operator=10000
51+
split_penalty_arithmetic_operator=300
52+
split_penalty_before_if_expr=0
53+
split_penalty_bitwise_operator=300
54+
split_penalty_comprehension=80
55+
split_penalty_excess_character=7000
56+
split_penalty_for_added_line_split=30
57+
split_penalty_import_names=0
58+
split_penalty_logical_operator=300
59+
use_tabs=True
60+
61+
# The regex for an i18n comment. The presence of this comment stops
62+
# reformatting of that line, because the comments are required to be
63+
# next to the string they translate.
64+
# i18n_comment=
65+
# The i18n function call names. The presence of this function stops
66+
# reformattting on that line, because the string it has cannot be moved
67+
# away from the i18n comment.
68+
# i18n_function_call=
69+
# no_spaces_around_selected_binary_operators=

0 commit comments

Comments
 (0)