.NET Format
Implements a commit workflow on every commit that runs `dotnet format` to format the source of the project via the rules configured within the editorConfig. This does nothing to assign any formatting, it just enforces the rules already present.
This commit is contained in:
+13
-11
@@ -12,11 +12,12 @@ indent_style = space
|
||||
indent_size = 4
|
||||
trim_trailing_whitespace = true
|
||||
|
||||
[{*.yaml,*.yml}]
|
||||
indent_size = 2
|
||||
|
||||
[*.json]
|
||||
ij_formatter_enabled = true
|
||||
indent_style = space
|
||||
indent_size = 2
|
||||
trim_trailing_whitespace = true
|
||||
|
||||
# C# files
|
||||
[*.cs]
|
||||
@@ -29,9 +30,6 @@ 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
|
||||
|
||||
# ReSharper properties
|
||||
resharper_wrap_object_and_collection_initializer_style = chop_always
|
||||
|
||||
# Indentation preferences
|
||||
csharp_indent_block_contents = true
|
||||
csharp_indent_braces = false
|
||||
@@ -77,13 +75,14 @@ dotnet_naming_style.camel_case_underscore_style.capitalization = camel_case
|
||||
csharp_using_directive_placement = outside_namespace:error
|
||||
dotnet_sort_system_directives_first = true
|
||||
csharp_prefer_braces = true:warning
|
||||
csharp_preserve_single_line_blocks = false
|
||||
csharp_preserve_single_line_statements = false
|
||||
csharp_prefer_static_local_function = true:suggestion
|
||||
csharp_prefer_simple_using_statement = false:none
|
||||
csharp_style_prefer_switch_expression = true:suggestion
|
||||
dotnet_style_readonly_field = true:suggestion
|
||||
|
||||
# csharp_preserve_single_line_blocks = false
|
||||
# csharp_preserve_single_line_statements = false
|
||||
|
||||
# Expression-level preferences
|
||||
dotnet_style_object_initializer = true:suggestion
|
||||
dotnet_style_collection_initializer = true:suggestion
|
||||
@@ -105,13 +104,11 @@ csharp_style_expression_bodied_operators = false:warning
|
||||
csharp_style_expression_bodied_properties = false:warning
|
||||
csharp_style_expression_bodied_indexers = false:warning
|
||||
csharp_style_expression_bodied_accessors = false:warning
|
||||
csharp_style_expression_bodied_lambdas = false:warning
|
||||
csharp_style_expression_bodied_local_functions = false:warning
|
||||
csharp_style_expression_bodied_lambdas = true
|
||||
|
||||
# Pattern matching
|
||||
csharp_style_pattern_matching_over_is_with_cast_check = true:suggestion
|
||||
csharp_style_pattern_matching_over_as_with_null_check = true:suggestion
|
||||
csharp_style_inlined_variable_declaration = true:suggestion
|
||||
csharp_style_prefer_pattern_matching = false:warning
|
||||
|
||||
# Null checking preferences
|
||||
csharp_style_throw_expression = true:suggestion
|
||||
@@ -121,6 +118,7 @@ csharp_style_conditional_delegate_call = true:suggestion
|
||||
csharp_style_prefer_index_operator = false:none
|
||||
csharp_style_prefer_range_operator = false:none
|
||||
csharp_style_pattern_local_over_anonymous_function = false:none
|
||||
csharp_style_inlined_variable_declaration = true
|
||||
|
||||
# Space preferences
|
||||
csharp_space_after_cast = true
|
||||
@@ -145,6 +143,10 @@ csharp_space_between_method_declaration_name_and_open_parenthesis = false
|
||||
csharp_space_between_method_declaration_parameter_list_parentheses = false
|
||||
csharp_space_between_square_brackets = false
|
||||
|
||||
# ReSharper properties
|
||||
resharper_wrap_object_and_collection_initializer_style = chop_always
|
||||
resharper_merge_into_pattern_highlighting = none
|
||||
|
||||
# Xml project files
|
||||
[*.{csproj,vbproj,vcxproj,vcxproj.filters,proj,nativeproj,locproj}]
|
||||
indent_size = 2
|
||||
|
||||
Reference in New Issue
Block a user