Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

.editorconfig repo override #632

Merged
merged 1 commit into from
Aug 5, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
kirankumarkolli marked this conversation as resolved.
Show resolved Hide resolved
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
kirankumarkolli marked this conversation as resolved.
Show resolved Hide resolved
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