root=true

[*]
end_of_line=crlf
insert_final_newline=true
indent_size=4
indent_style=space
max_line_length=150

[*.cs]
charset=utf-8-bom
trim_trailing_whitespace=true
# Ignore Unnecessary suppression as we don't have ReShaprer installed
dotnet_remove_unnecessary_suppression_exclusions=category: ReSharper
# New line preferences
csharp_new_line_before_open_brace=all
csharp_new_line_before_else=true
csharp_new_line_before_catch=true
csharp_new_line_before_finally=true
csharp_new_line_before_members_in_object_initializers=true
csharp_new_line_before_members_in_anonymous_types=true
csharp_new_line_between_query_expression_clauses=true
# Indentation preferences
csharp_indent_block_contents=true
csharp_indent_braces=false
csharp_indent_case_contents=true
csharp_indent_case_contents_when_block=true
csharp_indent_switch_labels=true
csharp_indent_labels=one_less_than_current
# Modifier preferences
csharp_preferred_modifier_order=public,private,protected,internal,static,extern,new,virtual,abstract,sealed,override,readonly,unsafe,volatile,async:suggestion
# Coding style
csharp_namespace_body=block_scoped
trailing_comma_in_multiline_lists=true
trailing_comma_in_singleline_lists=false
force_attribute_style=seperate
braces_for_ifelse=required
braces_for_for=required
braces_for_foreach=required
braces_for_lock=required
braces_for_using=required
braces_for_while=required
braces_redundant=false
object_creation_when_type_evident=explicitly_typed # target_typed is only available on C# 9
object_creation_when_type_not_evident=explicitly_typed
# Blank Lines formating. see: https://www.jetbrains.com/help/resharper/EditorConfig_CSHARP_BlankLinesPageScheme.html
blank_lines_before_single_line_comment=1
keep_blank_lines_in_declarations=1
blank_lines_after_start_comment=1
blank_lines_after_using_list=1
blank_lines_inside_namespace=0
blank_lines_after_file_scoped_namespace_directive=1
blank_lines_around_type=1
blank_lines_around_single_line_type=1
blank_lines_inside_type=0
blank_lines_around_field=1
blank_lines_around_single_line_field=1
blank_lines_around_property=1
blank_lines_around_single_line_property=1
blank_lines_around_auto_property=1
blank_lines_around_single_line_auto_property=1
blank_lines_around_accessor=1
blank_lines_around_single_line_accessor=0
blank_lines_around_invocable=1
blank_lines_around_single_line_invocable=1
keep_blank_lines_in_code=1
remove_blank_lines_near_braces=true
remove_blank_lines_near_braces_in_code=true
blank_lines_around_local_method=1
blank_lines_after_control_transfer_statements=1
blank_lines_after_block_statements=1
# Line Breaks. see: https://www.jetbrains.com/help/resharper/EditorConfig_CSHARP_LineBreaksPageSchema.html
keep_user_linebreaks=false
wrap_before_comma=false
special_else_if_treatment=true
keep_existing_arrangement=false
place_attribute_on_same_line=never
wrap_parameters_style=chop_if_long
wrap_before_declaration_lpar=false
wrap_after_declaration_lpar=false
wrap_before_declaration_rpar=false
place_constructor_initializer_on_same_line=false
place_type_constraints_on_same_line=false
wrap_before_first_type_parameter_constraint=true
wrap_multiple_type_parameter_constraints_style=chop_always
wrap_before_type_parameter_langle=false
wrap_extends_list_style=chop_if_long
place_simple_declaration_blocks_on_single_line=false
place_abstract_accessorholder_on_single_line=true
place_simple_blocks_on_single_line=true
place_simple_method_on_single_line=false
max_enum_members_on_line=0
place_simple_enum_on_single_line=false
wrap_enum_declaration=chop_always
new_line_before_else=false
new_line_before_while=true
new_line_before_catch=true
new_line_before_finally=true
wrap_for_stmt_header_style=chop_if_long
place_simple_case_statement_on_same_line=never
place_simple_embedded_block_on_same_line=false
place_simple_switch_expression_on_single_line=false
wrap_switch_expression=chop_always
place_simple_property_pattern_on_single_line=true
wrap_property_pattern=chop_if_long
place_simple_list_pattern_on_single_line=true
wrap_list_pattern=chop_if_long
place_simple_initializer_on_single_line=true
wrap_object_and_collection_initializer_style=chop_if_long
wrap_array_initializer_style=chop_if_long
wrap_arguments_style=chop_if_long
wrap_before_invocation_lpar=false
wrap_after_invocation_lpar=true
wrap_before_invocation_rpar=false
wrap_after_dot_in_method_calls=false
wrap_chained_method_calls=chop_if_long
wrap_before_binary_opsign=false
wrap_chained_binary_expressions=chop_if_long
wrap_before_binary_pattern_op=false
wrap_chained_binary_patterns=chop_if_long
force_chop_compound_if_expression=false
force_chop_compound_while_expression=false
force_chop_compound_do_expression=false
wrap_before_ternary_opsigns=false
wrap_ternary_expr_style=chop_if_long
nested_ternary_style=compact
wrap_linq_expressions=chop_if_long
wrap_before_linq_expression=false
place_linq_into_on_new_line=false
wrap_verbatim_interpolated_strings=no_wrap # not supported by unity c# version
# xml documentation code style. see: https://www.jetbrains.com/help/resharper/EditorConfig_XMLDOC_XmlDocCodeStylePageSchema.html
xmldoc_linebreaks_inside_tags_for_multiline_elements=true
xmldoc_wrap_text=true
xmldoc_wrap_around_elements=false
xmldoc_indent_text=one_indent
xmldoc_keep_user_linebreaks=true
# analyzer warings
dotnet_code_quality.ca1051.api_surface=all
dotnet_diagnostic.sa1633.severity=none
dotnet_diagnostic.sa1200.severity=none
dotnet_diagnostic.sa1101.severity=none
dotnet_diagnostic.SA1408.severity=none
dotnet_diagnostic.SA1407.severity=none
dotnet_diagnostic.SA1118.severity=none
dotnet_diagnostic.CA1002.severity=none
dotnet_diagnostic.CA1031.severity=none
dotnet_diagnostic.CA1062.severity=none
dotnet_diagnostic.CA2234.severity=none
dotnet_diagnostic.CA2007.severity=none
dotnet_diagnostic.CA1056.severity=none # URI-like properties should not be strings
dotnet_diagnostic.CA1054.severity=none # URI parameters should not be strings
# ReSharper properties
resharper_wrap_after_declaration_lpar=true

[{*.yaml,*.yml}]
indent_size=2
charset=utf-8-bom
trim_trailing_whitespace=true

[*.DotSettings]
max_line_length=off

[{*.xml,*.csproj,*.xlf,*.DotSettings,*.js,*.xaml,*.config,*.pubxml}]
charset=utf-8-bom
trim_trailing_whitespace=true

[{manifest.json,packages-lock.json,packages.config}]
indent_size=2
trim_trailing_whitespace=true