Skip to content

Commit

Permalink
Update .editorconfig
Browse files Browse the repository at this point in the history
  • Loading branch information
axelheer committed Feb 9, 2021
1 parent bb011b8 commit 0e8e19e
Showing 1 changed file with 76 additions and 59 deletions.
135 changes: 76 additions & 59 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -1,6 +1,17 @@
# Remove the line below if you want to inherit .editorconfig settings from higher directories
root = true

# All files
[*]

# Indentation and spacing
indent_size = 2
indent_style = space

# New line preferences
end_of_line = crlf
insert_final_newline = true

# C# files
[*.cs]

Expand All @@ -9,7 +20,6 @@ root = true
# Indentation and spacing
indent_size = 4
indent_style = space
tab_width = 4

# New line preferences
end_of_line = lf
Expand All @@ -32,10 +42,10 @@ dotnet_style_predefined_type_for_locals_parameters_members = true:suggestion
dotnet_style_predefined_type_for_member_access = true:suggestion

# Parentheses preferences
dotnet_style_parentheses_in_arithmetic_binary_operators = never_if_unnecessary:suggestion
dotnet_style_parentheses_in_other_binary_operators = never_if_unnecessary:suggestion
dotnet_style_parentheses_in_arithmetic_binary_operators = always_for_clarity:suggestion
dotnet_style_parentheses_in_other_binary_operators = always_for_clarity:suggestion
dotnet_style_parentheses_in_other_operators = never_if_unnecessary:suggestion
dotnet_style_parentheses_in_relational_binary_operators = never_if_unnecessary:suggestion
dotnet_style_parentheses_in_relational_binary_operators = always_for_clarity:suggestion

# Modifier preferences
dotnet_style_require_accessibility_modifiers = for_non_interface_members:suggestion
Expand All @@ -46,13 +56,15 @@ dotnet_style_collection_initializer = true:suggestion
dotnet_style_explicit_tuple_names = true:suggestion
dotnet_style_null_propagation = true:suggestion
dotnet_style_object_initializer = true:suggestion
dotnet_style_operator_placement_when_wrapping = beginning_of_line
dotnet_style_prefer_auto_properties = true:suggestion
dotnet_style_prefer_compound_assignment = true:suggestion
dotnet_style_prefer_conditional_expression_over_assignment = true:suggestion
dotnet_style_prefer_conditional_expression_over_return = true:suggestion
dotnet_style_prefer_inferred_anonymous_type_member_names = true:suggestion
dotnet_style_prefer_inferred_tuple_names = true:suggestion
dotnet_style_prefer_is_null_check_over_reference_equality_method = true:suggestion
dotnet_style_prefer_simplified_boolean_expressions = true:suggestion
dotnet_style_prefer_simplified_interpolation = true:suggestion

# Field preferences
Expand All @@ -61,6 +73,9 @@ dotnet_style_readonly_field = true:suggestion
# Parameter preferences
dotnet_code_quality_unused_parameters = all:suggestion

# Suppression preferences
dotnet_remove_unnecessary_suppression_exclusions = none

#### C# Coding Conventions ####

# var preferences
Expand All @@ -69,22 +84,24 @@ csharp_style_var_for_built_in_types = true:suggestion
csharp_style_var_when_type_is_apparent = true:suggestion

# Expression-bodied members
csharp_style_expression_bodied_accessors = when_on_single_line:suggestion
csharp_style_expression_bodied_accessors = true:suggestion
csharp_style_expression_bodied_constructors = false:suggestion
csharp_style_expression_bodied_indexers = when_on_single_line:suggestion
csharp_style_expression_bodied_lambdas = when_on_single_line:suggestion
csharp_style_expression_bodied_local_functions = when_on_single_line:suggestion
csharp_style_expression_bodied_methods = when_on_single_line:suggestion
csharp_style_expression_bodied_operators = when_on_single_line:suggestion
csharp_style_expression_bodied_properties = when_on_single_line:suggestion
csharp_style_expression_bodied_indexers = true:suggestion
csharp_style_expression_bodied_lambdas = true:suggestion
csharp_style_expression_bodied_local_functions = false:suggestion
csharp_style_expression_bodied_methods = true:suggestion
csharp_style_expression_bodied_operators = true:suggestion
csharp_style_expression_bodied_properties = true:suggestion

# Pattern matching preferences
csharp_style_pattern_matching_over_as_with_null_check = true:suggestion
csharp_style_pattern_matching_over_is_with_cast_check = true:suggestion
csharp_style_prefer_not_pattern = true:suggestion
csharp_style_prefer_pattern_matching = true:suggestion
csharp_style_prefer_switch_expression = true:suggestion

# Null-checking preferences
csharp_style_conditional_delegate_call = true:suggestion
csharp_style_conditional_delegate_call = false:suggestion

# Modifier preferences
csharp_prefer_static_local_function = true:suggestion
Expand Down Expand Up @@ -159,82 +176,82 @@ csharp_preserve_single_line_statements = true

# Naming rules

dotnet_naming_rule.interfaces_should_be_begins_with_i.severity = suggestion
dotnet_naming_rule.interfaces_should_be_begins_with_i.symbols = interfaces
dotnet_naming_rule.interfaces_should_be_begins_with_i.style = begins_with_i
dotnet_naming_rule.interface_should_be_begins_with_i.severity = suggestion
dotnet_naming_rule.interface_should_be_begins_with_i.symbols = interface
dotnet_naming_rule.interface_should_be_begins_with_i.style = begins_with_i

dotnet_naming_rule.type_parameters_should_be_begins_with_t.severity = suggestion
dotnet_naming_rule.type_parameters_should_be_begins_with_t.symbols = type_parameters
dotnet_naming_rule.type_parameters_should_be_begins_with_t.style = begins_with_t
dotnet_naming_rule.type_parameter_should_be_begins_with_t.severity = suggestion
dotnet_naming_rule.type_parameter_should_be_begins_with_t.symbols = type_parameter
dotnet_naming_rule.type_parameter_should_be_begins_with_t.style = begins_with_t

dotnet_naming_rule.all_types_should_be_pascal_case.severity = suggestion
dotnet_naming_rule.all_types_should_be_pascal_case.symbols = all_types
dotnet_naming_rule.all_types_should_be_pascal_case.style = pascal_case
dotnet_naming_rule.types_should_be_pascal_case.severity = suggestion
dotnet_naming_rule.types_should_be_pascal_case.symbols = types
dotnet_naming_rule.types_should_be_pascal_case.style = pascal_case

dotnet_naming_rule.non_field_members_should_be_pascal_case.severity = suggestion
dotnet_naming_rule.non_field_members_should_be_pascal_case.symbols = non_field_members
dotnet_naming_rule.non_field_members_should_be_pascal_case.style = pascal_case

dotnet_naming_rule.fields_and_parameters_should_be_camel_case.severity = suggestion
dotnet_naming_rule.fields_and_parameters_should_be_camel_case.symbols = fields_and_parameters
dotnet_naming_rule.fields_and_parameters_should_be_camel_case.style = camel_case
dotnet_naming_rule.field_or_parameter_should_be_camel_case.severity = suggestion
dotnet_naming_rule.field_or_parameter_should_be_camel_case.symbols = field_or_parameter
dotnet_naming_rule.field_or_parameter_should_be_camel_case.style = camel_case

dotnet_naming_rule.static_readonly_fields_should_be_pascal_case.severity = suggestion
dotnet_naming_rule.static_readonly_fields_should_be_pascal_case.symbols = static_readonly_fields
dotnet_naming_rule.static_readonly_fields_should_be_pascal_case.style = pascal_case
dotnet_naming_rule.static_and_readonly_field_should_be_pascal_case.severity = suggestion
dotnet_naming_rule.static_and_readonly_field_should_be_pascal_case.symbols = static_and_readonly_field
dotnet_naming_rule.static_and_readonly_field_should_be_pascal_case.style = pascal_case

dotnet_naming_rule.constant_fields_should_be_pascal_case.severity = suggestion
dotnet_naming_rule.constant_fields_should_be_pascal_case.symbols = constant_fields
dotnet_naming_rule.constant_fields_should_be_pascal_case.style = pascal_case
dotnet_naming_rule.constant_field_should_be_pascal_case.severity = suggestion
dotnet_naming_rule.constant_field_should_be_pascal_case.symbols = constant_field
dotnet_naming_rule.constant_field_should_be_pascal_case.style = pascal_case

# Symbol specifications

dotnet_naming_symbols.interfaces.applicable_kinds = interface
dotnet_naming_symbols.interfaces.applicable_accessibilities = public, internal, private, protected, protected_internal, private_protected
dotnet_naming_symbols.interfaces.required_modifiers =
dotnet_naming_symbols.interface.applicable_kinds = interface
dotnet_naming_symbols.interface.applicable_accessibilities = public, internal, private, protected, protected_internal, private_protected
dotnet_naming_symbols.interface.required_modifiers =

dotnet_naming_symbols.type_parameters.applicable_kinds = type_parameter
dotnet_naming_symbols.type_parameters.applicable_accessibilities = public, internal, private, protected, protected_internal, private_protected
dotnet_naming_symbols.type_parameters.required_modifiers =
dotnet_naming_symbols.type_parameter.applicable_kinds = type_parameter
dotnet_naming_symbols.type_parameter.applicable_accessibilities = public, internal, private, protected, protected_internal, private_protected
dotnet_naming_symbols.type_parameter.required_modifiers =

dotnet_naming_symbols.all_types.applicable_kinds = class, struct, interface, enum
dotnet_naming_symbols.all_types.applicable_accessibilities = public, internal, private, protected, protected_internal, private_protected
dotnet_naming_symbols.all_types.required_modifiers =
dotnet_naming_symbols.types.applicable_kinds = class, struct, interface, enum
dotnet_naming_symbols.types.applicable_accessibilities = public, internal, private, protected, protected_internal, private_protected
dotnet_naming_symbols.types.required_modifiers =

dotnet_naming_symbols.non_field_members.applicable_kinds = property, event, method
dotnet_naming_symbols.non_field_members.applicable_accessibilities = public, internal, private, protected, protected_internal, private_protected
dotnet_naming_symbols.non_field_members.required_modifiers =
dotnet_naming_symbols.non_field_members.required_modifiers =

dotnet_naming_symbols.fields_and_parameters.applicable_kinds = field, parameter
dotnet_naming_symbols.fields_and_parameters.applicable_accessibilities = public, internal, private, protected, protected_internal, private_protected
dotnet_naming_symbols.fields_and_parameters.required_modifiers =
dotnet_naming_symbols.field_or_parameter.applicable_kinds = field, parameter
dotnet_naming_symbols.field_or_parameter.applicable_accessibilities = public, internal, private, protected, protected_internal, private_protected
dotnet_naming_symbols.field_or_parameter.required_modifiers =

dotnet_naming_symbols.static_readonly_fields.applicable_kinds = field
dotnet_naming_symbols.static_readonly_fields.applicable_accessibilities = public, internal, private, protected, protected_internal, private_protected
dotnet_naming_symbols.static_readonly_fields.required_modifiers = static
dotnet_naming_symbols.static_and_readonly_field.applicable_kinds = field
dotnet_naming_symbols.static_and_readonly_field.applicable_accessibilities = public, internal, private, protected, protected_internal, private_protected
dotnet_naming_symbols.static_and_readonly_field.required_modifiers = readonly, static

dotnet_naming_symbols.constant_fields.applicable_kinds = field
dotnet_naming_symbols.constant_fields.applicable_accessibilities = public, internal, private, protected, protected_internal, private_protected
dotnet_naming_symbols.constant_fields.required_modifiers = const
dotnet_naming_symbols.constant_field.applicable_kinds = field
dotnet_naming_symbols.constant_field.applicable_accessibilities = public, internal, private, protected, protected_internal, private_protected
dotnet_naming_symbols.constant_field.required_modifiers = const

# Naming styles

dotnet_naming_style.begins_with_i.required_prefix = I
dotnet_naming_style.begins_with_i.required_suffix =
dotnet_naming_style.begins_with_i.word_separator =
dotnet_naming_style.begins_with_i.required_suffix =
dotnet_naming_style.begins_with_i.word_separator =
dotnet_naming_style.begins_with_i.capitalization = pascal_case

dotnet_naming_style.begins_with_t.required_prefix = T
dotnet_naming_style.begins_with_t.required_suffix =
dotnet_naming_style.begins_with_t.word_separator =
dotnet_naming_style.begins_with_t.required_suffix =
dotnet_naming_style.begins_with_t.word_separator =
dotnet_naming_style.begins_with_t.capitalization = pascal_case

dotnet_naming_style.pascal_case.required_prefix =
dotnet_naming_style.pascal_case.required_suffix =
dotnet_naming_style.pascal_case.word_separator =
dotnet_naming_style.pascal_case.required_prefix =
dotnet_naming_style.pascal_case.required_suffix =
dotnet_naming_style.pascal_case.word_separator =
dotnet_naming_style.pascal_case.capitalization = pascal_case

dotnet_naming_style.camel_case.required_prefix =
dotnet_naming_style.camel_case.required_suffix =
dotnet_naming_style.camel_case.word_separator =
dotnet_naming_style.camel_case.required_prefix =
dotnet_naming_style.camel_case.required_suffix =
dotnet_naming_style.camel_case.word_separator =
dotnet_naming_style.camel_case.capitalization = camel_case

0 comments on commit 0e8e19e

Please sign in to comment.