113 lines
3.7 KiB
INI
113 lines
3.7 KiB
INI
# EditorConfig is awesome: https://EditorConfig.org
|
|
|
|
# top-most EditorConfig file
|
|
root = true
|
|
|
|
# All files
|
|
[*]
|
|
charset = utf-8
|
|
insert_final_newline = true
|
|
trim_trailing_whitespace = true
|
|
|
|
# Code files
|
|
[*.{cs,csx,vb,vbx}]
|
|
indent_style = space
|
|
indent_size = 4
|
|
|
|
# XML project files
|
|
[*.{csproj,vbproj,vcxproj,vcxproj.filters,proj,projitems,shproj}]
|
|
indent_size = 2
|
|
|
|
# XML config files
|
|
[*.{props,targets,ruleset,config,nuspec,resx,vsixmanifest,vsct}]
|
|
indent_size = 2
|
|
|
|
# JSON files
|
|
[*.json]
|
|
indent_size = 2
|
|
|
|
# YAML files
|
|
[*.{yml,yaml}]
|
|
indent_size = 2
|
|
|
|
# Markdown files
|
|
[*.md]
|
|
trim_trailing_whitespace = false
|
|
|
|
# C# files
|
|
[*.cs]
|
|
|
|
# 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_case_contents = true
|
|
csharp_indent_switch_labels = true
|
|
csharp_indent_labels = flush_left
|
|
|
|
# Space preferences
|
|
csharp_space_after_cast = false
|
|
csharp_space_after_keywords_in_control_flow_statements = true
|
|
csharp_space_between_method_declaration_parameter_list_parentheses = false
|
|
csharp_space_between_method_declaration_empty_parameter_list_parentheses = false
|
|
csharp_space_between_method_call_parameter_list_parentheses = false
|
|
csharp_space_between_method_call_empty_parameter_list_parentheses = false
|
|
csharp_space_between_method_call_name_and_opening_parenthesis = false
|
|
csharp_space_after_comma = true
|
|
csharp_space_after_dot = false
|
|
|
|
# Wrapping preferences
|
|
csharp_preserve_single_line_statements = false
|
|
csharp_preserve_single_line_blocks = true
|
|
|
|
# Code style rules
|
|
csharp_prefer_braces = true:warning
|
|
csharp_prefer_simple_using_statement = true:suggestion
|
|
|
|
# Expression preferences
|
|
csharp_prefer_simple_default_expression = true:suggestion
|
|
csharp_style_pattern_local_over_anonymous_function = true:suggestion
|
|
csharp_style_prefer_index_operator = true:suggestion
|
|
csharp_style_prefer_range_operator = true:suggestion
|
|
|
|
# Pattern matching preferences
|
|
csharp_style_pattern_matching_over_is_with_cast_check = true:suggestion
|
|
csharp_style_pattern_matching_over_as_with_null_check = true:suggestion
|
|
csharp_style_prefer_switch_expression = true:suggestion
|
|
csharp_style_prefer_pattern_matching = true:suggestion
|
|
csharp_style_prefer_not_pattern = true:suggestion
|
|
|
|
# Null-checking preferences
|
|
csharp_style_conditional_delegate_call = true:suggestion
|
|
|
|
# Modifier preferences
|
|
csharp_prefer_static_local_function = true:suggestion
|
|
csharp_preferred_modifier_order = public,private,protected,internal,static,extern,new,virtual,abstract,sealed,override,readonly,unsafe,volatile,async:suggestion
|
|
|
|
# Code block preferences
|
|
csharp_prefer_simple_using_statement = true:suggestion
|
|
csharp_style_namespace_declarations = file_scoped:suggestion
|
|
|
|
# Expression-level preferences
|
|
csharp_style_unused_value_expression_statement_preference = discard_variable:suggestion
|
|
csharp_style_unused_value_assignment_preference = discard_variable:suggestion
|
|
|
|
# 'using' directive preferences
|
|
csharp_using_directive_placement = outside_namespace:warning
|
|
|
|
# Naming conventions
|
|
dotnet_naming_rule.interfaces_should_be_prefixed_with_i.severity = warning
|
|
dotnet_naming_rule.interfaces_should_be_prefixed_with_i.symbols = interface_symbols
|
|
dotnet_naming_rule.interfaces_should_be_prefixed_with_i.style = prefix_interface_with_i
|
|
|
|
dotnet_naming_symbols.interface_symbols.applicable_kinds = interface
|
|
dotnet_naming_symbols.interface_symbols.applicable_accessibilities = *
|
|
|
|
dotnet_naming_style.prefix_interface_with_i.required_prefix = I
|
|
dotnet_naming_style.prefix_interface_with_i.capitalization = pascal_case |