Skip to content

Commit

Permalink
eeditorconfig for consmos (#632)
Browse files Browse the repository at this point in the history
  • Loading branch information
kirankumarkolli authored Aug 5, 2019
1 parent 75c5695 commit b3623a5
Show file tree
Hide file tree
Showing 2 changed files with 70 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Microsoft.Azure.Cosmos.sln
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 15
VisualStudioVersion = 15.0.27130.2024
# Visual Studio Version 16
VisualStudioVersion = 16.0.29123.88
MinimumVisualStudioVersion = 10.0.40219.1
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Azure.Cosmos", "Microsoft.Azure.Cosmos\src\Microsoft.Azure.Cosmos.csproj", "{36F6F6A8-CEC8-4261-9948-903495BC3C25}"
EndProject
Expand Down
68 changes: 68 additions & 0 deletions Microsoft.Azure.Cosmos/.editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
# To learn more about .editorconfig see https://aka.ms/editorconfigdocs
###############################
# Core EditorConfig Options #
###############################
root = true

# All files
[*]
indent_style = space

# Code files
[*.cs]
indent_size = 4
tab_width = 4
trim_trailing_whitespace = true

###############################
# .NET Coding Conventions #
###############################
[*.cs]
# Organize usings
dotnet_separate_import_directive_groups = false
dotnet_sort_system_directives_first = true

# this. preferences
dotnet_style_qualification_for_field = true:error
dotnet_style_qualification_for_property = true:error
dotnet_style_qualification_for_method = true:error
dotnet_style_qualification_for_event = true:error

# New line preferences
csharp_new_line_before_open_brace = all

# Indentation preferences
csharp_indent_case_contents = true
csharp_indent_switch_labels = true
csharp_indent_labels = flush_left

# Space preferences
csharp_space_after_keywords_in_control_flow_statements = true

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

# Expression-level preferences
dotnet_style_prefer_auto_properties = true:error
dotnet_style_prefer_is_null_check_over_reference_equality_method = true:error

# CSharp code style settings:
csharp_style_var_for_built_in_types = false:error
csharp_style_var_when_type_is_apparent = false:error
csharp_style_var_elsewhere = false:error

## Naming Conventions
# Async methods should have [Async] suffix
[*.cs]
dotnet_naming_rule.async_method_must_end_with_async.symbols = async_methods
dotnet_naming_symbols.async_methods.applicable_kinds = method
dotnet_naming_symbols.async_methods.applicable_accessibilities = *
dotnet_naming_symbols.async_methods.required_modifiers = async

dotnet_naming_rule.async_method_must_end_with_async.style = async_suffix
dotnet_naming_style.async_suffix.required_suffix = Async

dotnet_naming_rule.async_method_must_end_with_async.severity = error

0 comments on commit b3623a5

Please sign in to comment.