Skip to content

Commit

Permalink
Update editorconfig file (#15038)
Browse files Browse the repository at this point in the history
  • Loading branch information
MikeAlhayek authored and hishamco committed Feb 1, 2024
1 parent 3295135 commit 5253bbb
Showing 1 changed file with 19 additions and 16 deletions.
35 changes: 19 additions & 16 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -11,25 +11,28 @@ indent_size = 2

[*.cs]
# Prefer "var" everywhere
csharp_style_var_for_built_in_types = true : suggestion
csharp_style_var_when_type_is_apparent = true : suggestion
csharp_style_var_elsewhere = true : suggestion
csharp_style_var_for_built_in_types = true : suggestion
csharp_style_var_when_type_is_apparent = true : suggestion
csharp_style_var_elsewhere = true : suggestion

# Newline settings
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_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

dotnet_diagnostic.IDE0290.severity = none
dotnet_diagnostic.IDE0305.severity = none

# Sort using and Import directives with System.* appearing first
dotnet_sort_system_directives_first = true

# Code-block preferences
csharp_prefer_braces = true
csharp_prefer_simple_using_statement = true
csharp_style_namespace_declarations = file_scoped
csharp_prefer_simple_using_statement = true
csharp_style_namespace_declarations = file_scoped:suggestion

# Avoid "this." if not necessary
dotnet_style_qualification_for_field = false : suggestion
Expand All @@ -42,11 +45,11 @@ dotnet_style_predefined_type_for_locals_parameters_members = true : suggestion
dotnet_style_predefined_type_for_member_access = true : suggestion

# Suggest more modern language features when available
csharp_style_pattern_matching_over_is_with_cast_check = true : none
csharp_style_pattern_matching_over_as_with_null_check = true : none
csharp_style_inlined_variable_declaration = true : none
csharp_style_throw_expression = true : none
csharp_style_conditional_delegate_call = true : none
csharp_style_pattern_matching_over_is_with_cast_check = true : none
csharp_style_pattern_matching_over_as_with_null_check = true : none
csharp_style_inlined_variable_declaration = true : none
csharp_style_throw_expression = true : none
csharp_style_conditional_delegate_call = true : none

dotnet_style_object_initializer = true : suggestion
dotnet_style_collection_initializer = true : suggestion
Expand Down

0 comments on commit 5253bbb

Please sign in to comment.