Skip to content
Permalink
Browse files

Started adding a editor config file

  • Loading branch information...
COM8 committed Apr 14, 2019
1 parent 60a3b68 commit f423a20d109b320c8db1977ae0f547164f6f4626
Showing with 146 additions and 0 deletions.
  1. +141 −0 .editorconfig
  2. +5 −0 UWPX-Client.sln
@@ -0,0 +1,141 @@
# Remove the line below if you want to inherit .editorconfig settings from higher directories
root = true

# C# files
[*.cs]

# Indentation and spacing
indent_size = 4
indent_style = space
tab_width = 4
trim_trailing_whitespace = true

######################################################################################################################################
# .NET coding convention settings for EditorConfig
# Documentation: https://docs.microsoft.com/en-us/visualstudio/ide/editorconfig-code-style-settings-reference?view=vs-2019
######################################################################################################################################

# New line preferences
end_of_line = crlf
insert_final_newline = false

# .NET code style settings

## "This." and "Me." qualifiers
dotnet_style_qualification_for_field = false:suggestion
dotnet_style_qualification_for_property = false
dotnet_style_qualification_for_method = false
dotnet_style_qualification_for_event = false

## Language keywords instead of framework type names for type references
dotnet_style_predefined_type_for_locals_parameters_members = true
dotnet_style_predefined_type_for_member_access = true

## Modifier preferences
dotnet_style_require_accessibility_modifiers = always
### csharp_preferred_modifier_order = public,private,protected,internal,static,extern,new,virtual,abstract,sealed,override,readonly,unsafe,volatile,async # Omitted
dotnet_style_readonly_field = true

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

## Expression-level preferences
dotnet_style_object_initializer = true
dotnet_style_collection_initializer = true
dotnet_style_explicit_tuple_names = false
dotnet_style_prefer_inferred_tuple_names = true
dotnet_style_prefer_inferred_anonymous_type_member_names = false
dotnet_style_prefer_auto_properties = true
dotnet_style_prefer_is_null_check_over_reference_equality_method = true
dotnet_style_prefer_conditional_expression_over_assignment = true
dotnet_style_prefer_conditional_expression_over_return = true

## Null-checking preferences
dotnet_style_coalesce_expression = true
dotnet_style_null_propagation = true

# C# code style settings

## Implicit and explicit types
csharp_style_var_for_built_in_types = false
csharp_style_var_when_type_is_apparent = false
csharp_style_var_elsewhere = false

## Expression-bodied members
csharp_style_expression_bodied_methods = when_on_single_line
csharp_style_expression_bodied_constructors = when_on_single_line
csharp_style_expression_bodied_operators = when_on_single_line
csharp_style_expression_bodied_properties = when_on_single_line
csharp_style_expression_bodied_indexers = when_on_single_line
csharp_style_expression_bodied_accessors = when_on_single_line

## Pattern matching
csharp_style_pattern_matching_over_is_with_cast_check = true
csharp_style_pattern_matching_over_as_with_null_check = true

## Inlined variable declarations
csharp_style_inlined_variable_declaration = true

## Expression-level preferences
csharp_prefer_simple_default_expression = true
csharp_style_deconstructed_variable_declaration = false
csharp_style_pattern_local_over_anonymous_function = true

## "Null" checking preferences
csharp_style_throw_expression = true
csharp_style_conditional_delegate_call = true

## Code block preferences
csharp_prefer_braces = true

# Formatting conventions

## .NET formatting settings
dotnet_sort_system_directives_first = true
dotnet_separate_import_directive_groups = false

## C# formatting 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_between_query_expression_clauses = true

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

## Spacing options
csharp_space_after_cast = false
csharp_space_after_keywords_in_control_flow_statements = true
csharp_space_between_method_declaration_parameter_list_parentheses = false
csharp_space_between_method_call_parameter_list_parentheses = false
### csharp_space_between_parentheses = control_flow_statements # Omitted
csharp_space_before_colon_in_inheritance_clause = false
csharp_space_after_colon_in_inheritance_clause = true
csharp_space_around_binary_operators = before_and_after
csharp_space_between_method_declaration_empty_parameter_list_parentheses = false
csharp_space_between_method_call_name_and_opening_parenthesis = false
csharp_space_between_method_call_empty_parameter_list_parentheses = false

## Wrapping options
csharp_preserve_single_line_statements = false
csharp_preserve_single_line_blocks = true

######################################################################################################################################
# .NET naming conventions for EditorConfig
# Documentation: https://docs.microsoft.com/en-us/visualstudio/ide/editorconfig-naming-conventions?view=vs-2019
######################################################################################################################################

# Style

## Require a prefix
dotnet_naming_style.interface.required_prefix = I

## Require a capitalization style
@@ -27,6 +27,11 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "UWP XMPP Client", "UWP XMPP
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Unicode", "Unicode\Unicode.csproj", "{0E93F94C-A663-4EB6-A6DE-6A853D162375}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{4E29D606-9759-4C1D-989F-B9EC0C6C21CB}"
ProjectSection(SolutionItems) = preProject
.editorconfig = .editorconfig
EndProjectSection
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU

0 comments on commit f423a20

Please sign in to comment.
You can’t perform that action at this time.