summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKyleMiles <krm504@nyu.edu>2022-01-27 20:19:59 -0500
committerKyleMiles <krm504@nyu.edu>2022-01-28 00:24:04 -0500
commit519c9db22367f2659d1a54599fab47e6313be06e (patch)
tree8f2140806c744b138716dcfc11633626e4d73d4e
parent5518388bf7d64dbadff84d3ed0a803a501a4b6a0 (diff)
Add formatter files
-rw-r--r--.clang-format84
-rw-r--r--.style.yapf69
2 files changed, 153 insertions, 0 deletions
diff --git a/.clang-format b/.clang-format
new file mode 100644
index 00000000..d112461c
--- /dev/null
+++ b/.clang-format
@@ -0,0 +1,84 @@
+---
+AlignAfterOpenBracket: DontAlign
+AlignConsecutiveMacros: 'true'
+AlignConsecutiveAssignments: 'false'
+AlignConsecutiveDeclarations: 'false'
+AlignEscapedNewlines: DontAlign
+AlignOperands: 'true'
+AlignTrailingComments: 'true'
+AllowAllArgumentsOnNextLine: 'true'
+AllowAllConstructorInitializersOnNextLine: 'false'
+AllowAllParametersOfDeclarationOnNextLine: 'false'
+AllowShortBlocksOnASingleLine: 'false'
+AllowShortCaseLabelsOnASingleLine: 'false'
+AllowShortFunctionsOnASingleLine: Inline
+AllowShortIfStatementsOnASingleLine: Never
+AllowShortLambdasOnASingleLine: Inline
+AllowShortLoopsOnASingleLine: 'false'
+AlwaysBreakAfterDefinitionReturnType: None
+AlwaysBreakAfterReturnType: None
+AlwaysBreakBeforeMultilineStrings: 'true'
+AlwaysBreakTemplateDeclarations: 'Yes'
+BinPackArguments: 'true'
+BinPackParameters: 'true'
+BreakBeforeBraces: Custom
+BraceWrapping:
+ AfterCaseLabel: 'true'
+ AfterClass: 'true'
+ AfterControlStatement: 'true'
+ AfterEnum: 'true'
+ AfterFunction: 'true'
+ AfterNamespace: 'false'
+ AfterObjCDeclaration: 'true'
+ AfterStruct: 'true'
+ AfterUnion: 'true'
+ AfterExternBlock: 'true'
+ BeforeCatch: 'true'
+ BeforeElse: 'true'
+ IndentBraces: 'false'
+ SplitEmptyFunction: 'false'
+ SplitEmptyRecord: 'false'
+ SplitEmptyNamespace: 'false'
+BreakBeforeBinaryOperators: NonAssignment
+BreakBeforeTernaryOperators: 'false'
+BreakConstructorInitializers: AfterColon
+BreakInheritanceList: AfterColon
+ColumnLimit: '120'
+CompactNamespaces: 'true'
+ConstructorInitializerAllOnOneLineOrOnePerLine: 'false'
+Cpp11BracedListStyle: 'true'
+DerivePointerAlignment: 'false'
+DisableFormat: 'false'
+EmptyLineBeforeAccessModifier: Always
+FixNamespaceComments: 'true'
+IncludeBlocks: Preserve
+IndentCaseLabels: 'false'
+IndentPPDirectives: BeforeHash
+IndentWrappedFunctionNames: 'true'
+KeepEmptyLinesAtTheStartOfBlocks: 'false'
+MaxEmptyLinesToKeep: '2'
+NamespaceIndentation: All
+PointerAlignment: Left
+SortIncludes: 'false'
+SortUsingDeclarations: 'true'
+SpaceAfterCStyleCast: 'false'
+SpaceAfterLogicalNot: 'false'
+SpaceAfterTemplateKeyword: 'true'
+SpaceBeforeAssignmentOperators: 'true'
+SpaceBeforeCpp11BracedList: 'true'
+SpaceBeforeCtorInitializerColon: 'true'
+SpaceBeforeInheritanceColon: 'true'
+SpaceBeforeParens: ControlStatements
+SpaceBeforeRangeBasedForLoopColon: 'true'
+SpaceInEmptyParentheses: 'false'
+SpacesBeforeTrailingComments: '2'
+SpacesInAngles: 'false'
+SpacesInCStyleCastParentheses: 'false'
+SpacesInContainerLiterals: 'false'
+SpacesInParentheses: 'false'
+SpacesInSquareBrackets: 'false'
+IndentWidth: '4'
+TabWidth: '4'
+UseTab: ForIndentation
+
+...
diff --git a/.style.yapf b/.style.yapf
new file mode 100644
index 00000000..9f4d68e9
--- /dev/null
+++ b/.style.yapf
@@ -0,0 +1,69 @@
+[style]
+
+align_closing_bracket_with_visual_indent=True
+allow_multiline_dictionary_keys=False
+allow_multiline_lambdas=False
+allow_split_before_default_or_named_assigns=False
+allow_split_before_dict_value=True
+arithmetic_precedence_indication=True
+blank_lines_around_top_level_definition=2
+blank_lines_between_top_level_imports_and_variables=1
+blank_line_before_class_docstring=False
+blank_line_before_module_docstring=False
+blank_line_before_nested_class_or_def=False
+coalesce_brackets=True
+column_limit=120
+continuation_align_style=SPACE
+continuation_indent_width=4
+dedent_closing_brackets=True
+disable_ending_comma_heuristic=True
+each_dict_entry_on_separate_line=False
+force_multiline_dict=False
+indent_blank_lines=False
+indent_closing_brackets=False
+indent_dictionary_value=True
+indent_width=4
+join_multiple_lines=False
+spaces_around_default_or_named_assign=False
+spaces_around_dict_delimiters=False
+spaces_around_list_delimiters=False
+spaces_around_power_operator=False
+spaces_around_subscript_colon=False
+spaces_around_tuple_delimiters=False
+spaces_before_comment=2
+space_between_ending_comma_and_closing_bracket=True
+space_inside_brackets=False
+split_all_comma_separated_values=False
+split_all_top_level_comma_separated_values=False
+split_arguments_when_comma_terminated=False
+split_before_arithmetic_operator=True
+split_before_bitwise_operator=True
+split_before_closing_bracket=True
+split_before_dict_set_generator=True
+split_before_dot=False
+split_before_expression_after_opening_paren=False
+split_before_first_argument=False
+split_before_logical_operator=True
+split_before_named_assigns=False
+split_complex_comprehension=False
+split_penalty_after_opening_bracket=300
+split_penalty_after_unary_operator=10000
+split_penalty_arithmetic_operator=300
+split_penalty_before_if_expr=0
+split_penalty_bitwise_operator=300
+split_penalty_comprehension=80
+split_penalty_excess_character=7000
+split_penalty_for_added_line_split=30
+split_penalty_import_names=0
+split_penalty_logical_operator=300
+use_tabs=True
+
+# The regex for an i18n comment. The presence of this comment stops
+# reformatting of that line, because the comments are required to be
+# next to the string they translate.
+# i18n_comment=
+# The i18n function call names. The presence of this function stops
+# reformattting on that line, because the string it has cannot be moved
+# away from the i18n comment.
+# i18n_function_call=
+# no_spaces_around_selected_binary_operators= \ No newline at end of file