Skip to content

Commit

Permalink
Merge pull request CosmosOS#826 from CosmosOS/editorconfig
Browse files Browse the repository at this point in the history
Added code style rules
  • Loading branch information
jp2masa authored Mar 4, 2018
2 parents d0f8fa8 + cc54ead commit 95d34f2
Showing 1 changed file with 56 additions and 4 deletions.
60 changes: 56 additions & 4 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,63 @@ root = true
[*]
insert_final_newline = true
indent_style = space
indent_size = 2
indent_size = 4
trim_trailing_whitespace = true

[*.cs]
indent_size = 4
csharp_style_conditional_delegate_call = true:suggestion
csharp_style_expression_bodied_accessors = true:suggestion
csharp_style_expression_bodied_constructors = false:suggestion
csharp_style_expression_bodied_indexers = true:suggestion
csharp_style_expression_bodied_methods = true:none
csharp_style_expression_bodied_operators = false:none
csharp_style_expression_bodied_properties = true:suggestion
csharp_style_inlined_variable_declaration = true:suggestion
csharp_style_pattern_matching_over_as_with_null_check = true:suggestion
csharp_style_pattern_matching_over_is_with_cast_check = true:suggestion
csharp_style_throw_expression = true:suggestion
csharp_style_var_elsewhere = true:none
csharp_style_var_for_built_in_types = true:suggestion
csharp_style_var_when_type_is_apparent = true:warning

csharp_indent_block_contents = true:warning
csharp_indent_braces = false:warning
csharp_indent_case_contents = true:warning
csharp_indent_switch_labels = true:warning

csharp_prefer_braces = true:warning
csharp_prefer_simple_default_expression = false:suggestion

csharp_space_after_cast = false:warning
csharp_space_after_keywords_in_control_flow_statements = true
csharp_space_after_colon_in_inheritance_clause = true:warning
csharp_space_after_comma = true:warning
csharp_space_after_dot = false:error
csharp_space_after_semicolon_in_for_statement = true:warning
csharp_space_before_colon_in_inheritance_clause = true:warning
csharp_space_before_comma = false:warning
csharp_space_before_dot = false:error
csharp_space_before_open_square_brackets = true:warning
csharp_space_before_semicolon_in_for_statement = false:error

[*.{cs,vb}]
dotnet_sort_system_directives_first = true

dotnet_style_coalesce_expression = true:warning
dotnet_style_collection_initializer = true:suggestion
dotnet_style_explicit_tuple_names = true:warning
dotnet_style_null_propagation = true:suggestion
dotnet_style_object_initializer = true:suggestion
dotnet_style_predefined_type_for_locals_parameters_members = true:warning
dotnet_style_predefined_type_for_member_access = false:warning
dotnet_style_qualification_for_event = false:warning
dotnet_style_qualification_for_field = false:warning
dotnet_style_qualification_for_method = false:warning

dotnet_naming_style.pascal_case.capitalization = pascal_case

dotnet_naming_symbols.properties.applicable_kinds = property

[*.csproj]
indent_size = 2
dotnet_naming_rule.properties_must_be_pascal_case.severity = warning
dotnet_naming_rule.properties_must_be_pascal_case.symbols = properties
dotnet_naming_rule.properties_must_be_pascal_case.style = pascal_case

0 comments on commit 95d34f2

Please sign in to comment.