From ebf336334a55dc3468f59af801c3a27dd8b02d0a Mon Sep 17 00:00:00 2001 From: James Croft Date: Tue, 12 Mar 2024 19:58:29 +0000 Subject: [PATCH] Update solution --- .editorconfig | 694 +++++++++++++++++++++-------------------------- src/Legerity.sln | 35 --- 2 files changed, 312 insertions(+), 417 deletions(-) diff --git a/.editorconfig b/.editorconfig index 968afd97..5b99dcca 100644 --- a/.editorconfig +++ b/.editorconfig @@ -1,404 +1,334 @@ -########################################## -# Common Settings -########################################## - -# This file is the top-most EditorConfig file root = true -# All Files [*] -charset = utf-8 -end_of_line = crlf indent_style = space -indent_size = 4 -insert_final_newline = false +charset = utf-8 trim_trailing_whitespace = true +insert_final_newline = true +spelling_exclusion_path = spelling.dic + +[*.cs] +indent_size = 4 +dotnet_sort_system_directives_first = true -########################################## -# File Extension Settings -########################################## +# Don't use this. qualifier +dotnet_style_qualification_for_field = false:suggestion +dotnet_style_qualification_for_property = false:suggestion -# Visual Studio Solution Files -[*.sln] -indent_style = tab +# use int x = .. over Int32 +dotnet_style_predefined_type_for_locals_parameters_members = true:suggestion -# Visual Studio XML Project Files -[*.{csproj,vbproj,vcxproj,vcxproj.filters,proj,projitems,shproj}] -indent_size = 2 +# use int.MaxValue over Int32.MaxValue +dotnet_style_predefined_type_for_member_access = true:suggestion -# Various XML Configuration Files -[*.{xml,config,props,targets,nuspec,resx,ruleset,vsixmanifest,vsct}] -indent_size = 2 +# Require var all the time. +csharp_style_var_for_built_in_types = true:suggestion +csharp_style_var_when_type_is_apparent = true:suggestion +csharp_style_var_elsewhere = true:suggestion -# JSON Files -[*.{json,json5}] -indent_size = 2 +# Disallow throw expressions. +csharp_style_throw_expression = false:suggestion + +# Newline 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 + +# Namespace settings +csharp_style_namespace_declarations = file_scoped + +# Brace settings +csharp_prefer_braces = true # Prefer curly braces even for one line of code + +# name all constant fields using PascalCase +dotnet_naming_rule.constant_fields_should_be_pascal_case.severity = warning +dotnet_naming_rule.constant_fields_should_be_pascal_case.symbols = constant_fields +dotnet_naming_rule.constant_fields_should_be_pascal_case.style = pascal_case_style +dotnet_naming_symbols.constant_fields.applicable_kinds = field +dotnet_naming_symbols.constant_fields.required_modifiers = const +dotnet_naming_style.pascal_case_style.capitalization = pascal_case -# YAML Files -[*.{yml,yaml}] +# static fields should have s_ prefix +dotnet_naming_rule.static_fields_should_have_prefix.severity = warning +dotnet_naming_rule.static_fields_should_have_prefix.symbols = static_fields +dotnet_naming_rule.static_fields_should_have_prefix.style = static_prefix_style +dotnet_naming_symbols.static_fields.applicable_kinds = field +dotnet_naming_symbols.static_fields.required_modifiers = static +dotnet_naming_symbols.static_fields.applicable_accessibilities = private, internal, private_protected +dotnet_naming_style.static_prefix_style.required_prefix = s_ +dotnet_naming_style.static_prefix_style.capitalization = camel_case + +# internal and private fields should be _camelCase +dotnet_naming_rule.camel_case_for_private_internal_fields.severity = warning +dotnet_naming_rule.camel_case_for_private_internal_fields.symbols = private_internal_fields +dotnet_naming_rule.camel_case_for_private_internal_fields.style = camel_case_underscore_style +dotnet_naming_symbols.private_internal_fields.applicable_kinds = field +dotnet_naming_symbols.private_internal_fields.applicable_accessibilities = private, internal +dotnet_naming_style.camel_case_underscore_style.required_prefix = _ +dotnet_naming_style.camel_case_underscore_style.capitalization = camel_case + +[*.{xml,config,*proj,nuspec,props,resx,targets,yml,tasks}] indent_size = 2 -# Markdown Files -[*.md] -trim_trailing_whitespace = false +# Xml config files +[*.{props,targets,ruleset,config,nuspec,resx,vsixmanifest,vsct}] +indent_size = 2 -# Web Files -[*.{htm,html,js,ts,tsx,css,sass,scss,less,svg,vue}] +[*.json] indent_size = 2 -insert_final_newline = true -# Batch Files -[*.{cmd,bat}] +[*.{ps1,psm1}] +indent_size = 4 -# Bash Files [*.sh] +indent_size = 4 end_of_line = lf -########################################## -# .NET Language Conventions -# https://docs.microsoft.com/en-us/visualstudio/ide/editorconfig-code-style-settings-reference#language-conventions -########################################## - -# .NET Code Style Settings -[*.{cs,csx,cake,vb}] -# "this." and "Me." qualifiers -# https://docs.microsoft.com/en-us/visualstudio/ide/editorconfig-code-style-settings-reference#this_and_me -#prefer fields to be prefaced with this. in C# or Me. in Visual Basic -dotnet_style_qualification_for_field = true:warning -#prefer properties to be prefaced with this. or Me. in Visual Basic -dotnet_style_qualification_for_property = true:warning -#prefer methods to be prefaced with this. in C# or Me. in Visual Basic -dotnet_style_qualification_for_method = true:warning -#prefer events to be prefaced with this. in C# or Me. in Visual Basic -dotnet_style_qualification_for_event = true:warning - -# Language keywords instead of framework type names for type references -# https://docs.microsoft.com/en-us/visualstudio/ide/editorconfig-code-style-settings-reference#language_keywords -#prefer the language keyword for local variables, method parameters, and class members, instead of the type name, for types that have a keyword to represent them -dotnet_style_predefined_type_for_locals_parameters_members = true:warning -#prefer the language keyword for member access expressions, instead of the type name, for types that have a keyword to represent them -dotnet_style_predefined_type_for_member_access = true:warning - -# Modifier preferences -# https://docs.microsoft.com/en-us/visualstudio/ide/editorconfig-code-style-settings-reference#normalize_modifiers -dotnet_style_require_accessibility_modifiers = always:warning -csharp_preferred_modifier_order = public,private,protected,internal,static,extern,new,virtual,abstract,sealed,override,readonly,unsafe,volatile,async -visual_basic_preferred_modifier_order = Partial,Default,Private,Protected,Public,Friend,NotOverridable,Overridable,MustOverride,Overloads,Overrides,MustInherit,NotInheritable,Static,Shared,Shadows,ReadOnly,WriteOnly,Dim,Const,WithEvents,Widening,Narrowing,Custom,Async -dotnet_style_readonly_field = true:warning - -# Parentheses preferences -# https://docs.microsoft.com/en-us/visualstudio/ide/editorconfig-code-style-settings-reference#parentheses -dotnet_style_parentheses_in_arithmetic_binary_operators = always_for_clarity:warning -dotnet_style_parentheses_in_relational_binary_operators = always_for_clarity:warning -dotnet_style_parentheses_in_other_binary_operators = always_for_clarity:warning -dotnet_style_parentheses_in_other_operators = never_if_unnecessary:suggestion - -# Expression-level preferences -# https://docs.microsoft.com/en-us/visualstudio/ide/editorconfig-code-style-settings-reference#expression_level -dotnet_style_object_initializer = true:warning -dotnet_style_collection_initializer = true:warning -dotnet_style_explicit_tuple_names = true:warning -dotnet_style_prefer_inferred_tuple_names = true:warning -dotnet_style_prefer_inferred_anonymous_type_member_names = true:warning -dotnet_style_prefer_auto_properties = true:warning -dotnet_style_prefer_is_null_check_over_reference_equality_method = true:warning -dotnet_style_prefer_conditional_expression_over_assignment = false:suggestion -dotnet_style_prefer_conditional_expression_over_return = false:suggestion - -# Null-checking preferences -# https://docs.microsoft.com/en-us/visualstudio/ide/editorconfig-code-style-settings-reference#null_checking -dotnet_style_coalesce_expression = true:warning -dotnet_style_null_propagation = true:warning - -# C# Code Style Settings -[*.{cs,csx,cake}] -# Implicit and explicit types -# https://docs.microsoft.com/en-us/visualstudio/ide/editorconfig-code-style-settings-reference#implicit-and-explicit-types -#prefer explicit type over var to declare variables with built-in system types such as int -csharp_style_var_for_built_in_types = false:suggestion -#prefer explicit var over type when the type is already mentioned on the right-hand side of a declaration -csharp_style_var_when_type_is_apparent = true:warning -#prefer explicit type over var to declare variables where type is elsewhere -csharp_style_var_elsewhere = false:warning - -# Expression-bodied members -# https://docs.microsoft.com/en-us/visualstudio/ide/editorconfig-code-style-settings-reference#expression_bodied_members -#prefer block bodies for methods -csharp_style_expression_bodied_methods = false:warning -#prefer block bodies for constructors -csharp_style_expression_bodied_constructors = false:warning -#prefer block bodies for operators -csharp_style_expression_bodied_operators = false:warning -#prefer expression-bodied members for properties -csharp_style_expression_bodied_properties = true:warning -#prefer expression-bodied members for indexers -csharp_style_expression_bodied_indexers = true:warning -#prefer expression-bodied members for accessors -csharp_style_expression_bodied_accessors = true:warning - -# Pattern matching -# https://docs.microsoft.com/en-us/visualstudio/ide/editorconfig-code-style-settings-reference#pattern_matching -csharp_style_pattern_matching_over_is_with_cast_check = true:warning -csharp_style_pattern_matching_over_as_with_null_check = true:warning - -# Inlined variable declarations -# https://docs.microsoft.com/en-us/visualstudio/ide/editorconfig-code-style-settings-reference#inlined_variable_declarations -#prefer out variables to be declared inline in the argument list of a method call when possible -csharp_style_inlined_variable_declaration = true:suggestion - -# Expression-level preferences -# https://docs.microsoft.com/en-us/visualstudio/ide/editorconfig-code-style-settings-reference#expression_level_csharp -csharp_prefer_simple_default_expression = true:warning -csharp_style_deconstructed_variable_declaration = true:warning -csharp_style_pattern_local_over_anonymous_function = true:warning - -# "Null" checking preferences -# https://docs.microsoft.com/en-us/visualstudio/ide/editorconfig-code-style-settings-reference#null_checking_csharp -csharp_style_throw_expression = true:warning -csharp_style_conditional_delegate_call = true:warning - -# Code block preferences -# https://docs.microsoft.com/en-us/visualstudio/ide/editorconfig-code-style-settings-reference#code_block -csharp_prefer_braces = true:warning - -########################################## -# .NET Formatting Conventions -# https://docs.microsoft.com/en-us/visualstudio/ide/editorconfig-code-style-settings-reference#formatting-conventions -########################################## - -# Organize usings -# https://docs.microsoft.com/en-us/visualstudio/ide/editorconfig-code-style-settings-reference#usings -#sort System.* using directives alphabetically, and place them before other usings -dotnet_sort_system_directives_first = true +[*.{razor,cshtml}] +charset = utf-8-bom -# Using statement placement (Undocumented) -csharp_using_directive_placement = inside_namespace:warning +[*.{cs,vb}] -# C# formatting settings -# https://docs.microsoft.com/en-us/visualstudio/ide/editorconfig-code-style-settings-reference#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 -# https://docs.microsoft.com/en-us/visualstudio/ide/editorconfig-code-style-settings-reference#indent -#indent switch case contents. -csharp_indent_case_contents = true -#indent switch labels -csharp_indent_switch_labels = true -csharp_indent_labels = no_change - -# Spacing options -# https://docs.microsoft.com/en-us/visualstudio/ide/editorconfig-code-style-settings-reference#spacing -#require NO space between a cast and the value -csharp_space_after_cast = false -#require a space after a keyword in a control flow statement such as a for loop -csharp_space_after_keywords_in_control_flow_statements = true -#place a space character after the opening parenthesis and before the closing parenthesis of a method declaration parameter list. -csharp_space_between_method_declaration_parameter_list_parentheses = false -#do not place space characters after the opening parenthesis and before the closing parenthesis of a method call -csharp_space_between_method_call_parameter_list_parentheses = false -csharp_space_between_parentheses = false -#require a space before the colon for bases or interfaces in a type declaration -csharp_space_before_colon_in_inheritance_clause = true -#require a space before the colon for bases or interfaces in a type declaration -csharp_space_after_colon_in_inheritance_clause = true -csharp_space_around_binary_operators = before_and_after -#remove space within empty parameter list parentheses for a method declaration -csharp_space_between_method_declaration_empty_parameter_list_parentheses = false -#remove space between method call name and opening parenthesis -csharp_space_between_method_call_name_and_opening_parenthesis = false -#remove space within empty argument list parentheses -csharp_space_between_method_call_empty_parameter_list_parentheses = false - -# Wrapping options -# https://docs.microsoft.com/en-us/visualstudio/ide/editorconfig-code-style-settings-reference#wrapping -#leave statements and member declarations on the same line -csharp_preserve_single_line_statements = true -#leave code block on single line -csharp_preserve_single_line_blocks = true - -# More Indentation options (Undocumented) -csharp_indent_block_contents = true -csharp_indent_braces = false - -# Spacing Options (Undocumented) -csharp_space_after_comma = true -csharp_space_after_dot = false -csharp_space_after_semicolon_in_for_statement = true -csharp_space_around_declaration_statements = do_not_ignore -csharp_space_before_comma = false -csharp_space_before_dot = false -csharp_space_before_semicolon_in_for_statement = false -csharp_space_before_open_square_brackets = false -csharp_space_between_empty_square_brackets = false -csharp_space_between_method_declaration_name_and_open_parenthesis = false -csharp_space_between_square_brackets = false - -########################################## -# .NET Naming Conventions -# https://docs.microsoft.com/en-us/visualstudio/ide/editorconfig-naming-conventions -########################################## - -[*.{cs,csx,cake,vb}] - -########################################## -# Styles -########################################## - -# camel_case_style - Define the camelCase style -dotnet_naming_style.camel_case_style.capitalization = camel_case -# pascal_case_style - Define the Pascal_case style -dotnet_naming_style.pascal_case_style.capitalization = pascal_case -# first_upper_style - The first character must start with an upper-case character -dotnet_naming_style.first_upper_style.capitalization = first_word_upper -# prefix_interface_with_i_style - Interfaces must be PascalCase and the first character of an interface must be an 'I' -dotnet_naming_style.prefix_interface_with_i_style.capitalization = pascal_case -dotnet_naming_style.prefix_interface_with_i_style.required_prefix = I -# prefix_type_parameters_with_t_style - Generic Type Parameters must be PascalCase and the first character must be a 'T' -dotnet_naming_style.prefix_type_parameters_with_t_style.capitalization = pascal_case -dotnet_naming_style.prefix_type_parameters_with_t_style.required_prefix = T -# disallowed_style - Anything that has this style applied is marked as disallowed -dotnet_naming_style.disallowed_style.capitalization = pascal_case -dotnet_naming_style.disallowed_style.required_prefix = ____RULE_VIOLATION____ -dotnet_naming_style.disallowed_style.required_suffix = ____RULE_VIOLATION____ -# internal_error_style - This style should never occur... if it does, it's indicates a bug in file or in the parser using the file -dotnet_naming_style.internal_error_style.capitalization = pascal_case -dotnet_naming_style.internal_error_style.required_prefix = ____INTERNAL_ERROR____ -dotnet_naming_style.internal_error_style.required_suffix = ____INTERNAL_ERROR____ - -########################################## -# .NET Design Guideline Field Naming Rules -# Naming rules for fields follow the .NET Framework design guidelines -# https://docs.microsoft.com/en-us/dotnet/standard/design-guidelines/index -########################################## - -# All public/protected/protected_internal constant fields must be PascalCase -# https://docs.microsoft.com/en-us/dotnet/standard/design-guidelines/field -dotnet_naming_symbols.public_protected_constant_fields_group.applicable_accessibilities = public, protected, protected_internal -dotnet_naming_symbols.public_protected_constant_fields_group.required_modifiers = const -dotnet_naming_symbols.public_protected_constant_fields_group.applicable_kinds = field -dotnet_naming_rule.public_protected_constant_fields_must_be_pascal_case_rule.symbols = public_protected_constant_fields_group -dotnet_naming_rule.public_protected_constant_fields_must_be_pascal_case_rule.style = pascal_case_style -dotnet_naming_rule.public_protected_constant_fields_must_be_pascal_case_rule.severity = warning - -# All public/protected/protected_internal static readonly fields must be PascalCase -# https://docs.microsoft.com/en-us/dotnet/standard/design-guidelines/field -dotnet_naming_symbols.public_protected_static_readonly_fields_group.applicable_accessibilities = public, protected, protected_internal -dotnet_naming_symbols.public_protected_static_readonly_fields_group.required_modifiers = static, readonly -dotnet_naming_symbols.public_protected_static_readonly_fields_group.applicable_kinds = field -dotnet_naming_rule.public_protected_static_readonly_fields_must_be_pascal_case_rule.symbols = public_protected_static_readonly_fields_group -dotnet_naming_rule.public_protected_static_readonly_fields_must_be_pascal_case_rule.style = pascal_case_style -dotnet_naming_rule.public_protected_static_readonly_fields_must_be_pascal_case_rule.severity = warning - -# No other public/protected/protected_internal fields are allowed -# https://docs.microsoft.com/en-us/dotnet/standard/design-guidelines/field -dotnet_naming_symbols.other_public_protected_fields_group.applicable_accessibilities = public, protected, protected_internal -dotnet_naming_symbols.other_public_protected_fields_group.applicable_kinds = field -dotnet_naming_rule.other_public_protected_fields_disallowed_rule.symbols = other_public_protected_fields_group -dotnet_naming_rule.other_public_protected_fields_disallowed_rule.style = disallowed_style -dotnet_naming_rule.other_public_protected_fields_disallowed_rule.severity = error - -########################################## -# StyleCop Field Naming Rules -# Naming rules for fields follow the StyleCop analyzers -# This does not override any rules using disallowed_style above -# https://github.com/DotNetAnalyzers/StyleCopAnalyzers -########################################## - -# All constant fields must be PascalCase -# https://github.com/DotNetAnalyzers/StyleCopAnalyzers/blob/master/documentation/SA1303.md -dotnet_naming_symbols.stylecop_constant_fields_group.applicable_accessibilities = public, internal, protected_internal, protected, private_protected, private -dotnet_naming_symbols.stylecop_constant_fields_group.required_modifiers = const -dotnet_naming_symbols.stylecop_constant_fields_group.applicable_kinds = field -dotnet_naming_rule.stylecop_constant_fields_must_be_pascal_case_rule.symbols = stylecop_constant_fields_group -dotnet_naming_rule.stylecop_constant_fields_must_be_pascal_case_rule.style = pascal_case_style -dotnet_naming_rule.stylecop_constant_fields_must_be_pascal_case_rule.severity = warning - -# All static readonly fields must be PascalCase -# https://github.com/DotNetAnalyzers/StyleCopAnalyzers/blob/master/documentation/SA1311.md -dotnet_naming_symbols.stylecop_static_readonly_fields_group.applicable_accessibilities = public, internal, protected_internal, protected, private_protected, private -dotnet_naming_symbols.stylecop_static_readonly_fields_group.required_modifiers = static, readonly -dotnet_naming_symbols.stylecop_static_readonly_fields_group.applicable_kinds = field -dotnet_naming_rule.stylecop_static_readonly_fields_must_be_pascal_case_rule.symbols = stylecop_static_readonly_fields_group -dotnet_naming_rule.stylecop_static_readonly_fields_must_be_pascal_case_rule.style = pascal_case_style -dotnet_naming_rule.stylecop_static_readonly_fields_must_be_pascal_case_rule.severity = warning - -# No non-private instance fields are allowed -# https://github.com/DotNetAnalyzers/StyleCopAnalyzers/blob/master/documentation/SA1401.md -dotnet_naming_symbols.stylecop_fields_must_be_private_group.applicable_accessibilities = public, internal, protected_internal, protected, private_protected -dotnet_naming_symbols.stylecop_fields_must_be_private_group.applicable_kinds = field -dotnet_naming_rule.stylecop_instance_fields_must_be_private_rule.symbols = stylecop_fields_must_be_private_group -dotnet_naming_rule.stylecop_instance_fields_must_be_private_rule.style = disallowed_style -dotnet_naming_rule.stylecop_instance_fields_must_be_private_rule.severity = error - -# Private fields must be camelCase -# https://github.com/DotNetAnalyzers/StyleCopAnalyzers/blob/master/documentation/SA1306.md -dotnet_naming_symbols.stylecop_private_fields_group.applicable_accessibilities = private -dotnet_naming_symbols.stylecop_private_fields_group.applicable_kinds = field -dotnet_naming_rule.stylecop_private_fields_must_be_camel_case_rule.symbols = stylecop_private_fields_group -dotnet_naming_rule.stylecop_private_fields_must_be_camel_case_rule.style = camel_case_style -dotnet_naming_rule.stylecop_private_fields_must_be_camel_case_rule.severity = warning - -# Local variables must be camelCase -# https://github.com/DotNetAnalyzers/StyleCopAnalyzers/blob/master/documentation/SA1312.md -dotnet_naming_symbols.stylecop_local_fields_group.applicable_accessibilities = local -dotnet_naming_symbols.stylecop_local_fields_group.applicable_kinds = local -dotnet_naming_rule.stylecop_local_fields_must_be_camel_case_rule.symbols = stylecop_local_fields_group -dotnet_naming_rule.stylecop_local_fields_must_be_camel_case_rule.style = camel_case_style -dotnet_naming_rule.stylecop_local_fields_must_be_camel_case_rule.severity = silent - -# This rule should never fire. However, it's included for at least two purposes: -# First, it helps to understand, reason about, and root-case certain types of issues, such as bugs in .editorconfig parsers. -# Second, it helps to raise immediate awareness if a new field type is added (as occurred recently in C#). -dotnet_naming_symbols.sanity_check_uncovered_field_case_group.applicable_accessibilities = * -dotnet_naming_symbols.sanity_check_uncovered_field_case_group.applicable_kinds = field -dotnet_naming_rule.sanity_check_uncovered_field_case_rule.symbols = sanity_check_uncovered_field_case_group -dotnet_naming_rule.sanity_check_uncovered_field_case_rule.style = internal_error_style -dotnet_naming_rule.sanity_check_uncovered_field_case_rule.severity = error - - -########################################## -# Other Naming Rules -########################################## - -# All of the following must be PascalCase: -# - Namespaces -# https://docs.microsoft.com/en-us/dotnet/standard/design-guidelines/names-of-namespaces -# https://github.com/DotNetAnalyzers/StyleCopAnalyzers/blob/master/documentation/SA1300.md -# - Classes and Enumerations -# https://docs.microsoft.com/en-us/dotnet/standard/design-guidelines/names-of-classes-structs-and-interfaces -# https://github.com/DotNetAnalyzers/StyleCopAnalyzers/blob/master/documentation/SA1300.md -# - Delegates -# https://docs.microsoft.com/en-us/dotnet/standard/design-guidelines/names-of-classes-structs-and-interfaces#names-of-common-types -# - Constructors, Properties, Events, Methods -# https://docs.microsoft.com/en-us/dotnet/standard/design-guidelines/names-of-type-members -dotnet_naming_symbols.element_group.applicable_kinds = namespace, class, enum, struct, delegate, event, method, property -dotnet_naming_rule.element_rule.symbols = element_group -dotnet_naming_rule.element_rule.style = pascal_case_style -dotnet_naming_rule.element_rule.severity = warning - -# Interfaces use PascalCase and are prefixed with uppercase 'I' -# https://docs.microsoft.com/en-us/dotnet/standard/design-guidelines/names-of-classes-structs-and-interfaces -dotnet_naming_symbols.interface_group.applicable_kinds = interface -dotnet_naming_rule.interface_rule.symbols = interface_group -dotnet_naming_rule.interface_rule.style = prefix_interface_with_i_style -dotnet_naming_rule.interface_rule.severity = warning - -# Generics Type Parameters use PascalCase and are prefixed with uppercase 'T' -# https://docs.microsoft.com/en-us/dotnet/standard/design-guidelines/names-of-classes-structs-and-interfaces -dotnet_naming_symbols.type_parameter_group.applicable_kinds = type_parameter -dotnet_naming_rule.type_parameter_rule.symbols = type_parameter_group -dotnet_naming_rule.type_parameter_rule.style = prefix_type_parameters_with_t_style -dotnet_naming_rule.type_parameter_rule.severity = warning - -# Function parameters use camelCase -# https://docs.microsoft.com/en-us/dotnet/standard/design-guidelines/naming-parameters -dotnet_naming_symbols.parameters_group.applicable_kinds = parameter -dotnet_naming_rule.parameters_rule.symbols = parameters_group -dotnet_naming_rule.parameters_rule.style = camel_case_style -dotnet_naming_rule.parameters_rule.severity = warning +# SYSLIB1054: Use 'LibraryImportAttribute' instead of 'DllImportAttribute' to generate P/Invoke marshalling code at compile time +dotnet_diagnostic.SYSLIB1054.severity = warning + +# CA1018: Mark attributes with AttributeUsageAttribute +dotnet_diagnostic.CA1018.severity = warning + +# CA1047: Do not declare protected member in sealed type +dotnet_diagnostic.CA1047.severity = warning + +# CA1305: Specify IFormatProvider +dotnet_diagnostic.CA1305.severity = warning + +# CA1507: Use nameof to express symbol names +dotnet_diagnostic.CA1507.severity = warning + +# CA1510: Use ArgumentNullException throw helper +dotnet_diagnostic.CA1510.severity = warning + +# CA1511: Use ArgumentException throw helper +dotnet_diagnostic.CA1511.severity = warning + +# CA1512: Use ArgumentOutOfRangeException throw helper +dotnet_diagnostic.CA1512.severity = warning + +# CA1513: Use ObjectDisposedException throw helper +dotnet_diagnostic.CA1513.severity = warning + +# CA1725: Parameter names should match base declaration +dotnet_diagnostic.CA1725.severity = suggestion + +# CA1802: Use literals where appropriate +dotnet_diagnostic.CA1802.severity = warning + +# CA1805: Do not initialize unnecessarily +dotnet_diagnostic.CA1805.severity = warning + +# CA1810: Do not initialize unnecessarily +dotnet_diagnostic.CA1810.severity = warning + +# CA1821: Remove empty Finalizers +dotnet_diagnostic.CA1821.severity = warning + +# CA1822: Make member static +dotnet_diagnostic.CA1822.severity = warning +dotnet_code_quality.CA1822.api_surface = private, internal + +# CA1823: Avoid unused private fields +dotnet_diagnostic.CA1823.severity = warning + +# CA1825: Avoid zero-length array allocations +dotnet_diagnostic.CA1825.severity = warning + +# CA1826: Do not use Enumerable methods on indexable collections. Instead use the collection directly +dotnet_diagnostic.CA1826.severity = warning + +# CA1827: Do not use Count() or LongCount() when Any() can be used +dotnet_diagnostic.CA1827.severity = warning + +# CA1828: Do not use CountAsync() or LongCountAsync() when AnyAsync() can be used +dotnet_diagnostic.CA1828.severity = warning + +# CA1829: Use Length/Count property instead of Count() when available +dotnet_diagnostic.CA1829.severity = warning + +# CA1830: Prefer strongly-typed Append and Insert method overloads on StringBuilder +dotnet_diagnostic.CA1830.severity = warning + +# CA1831: Use AsSpan or AsMemory instead of Range-based indexers when appropriate +dotnet_diagnostic.CA1831.severity = warning + +# CA1832: Use AsSpan or AsMemory instead of Range-based indexers when appropriate +dotnet_diagnostic.CA1832.severity = warning + +# CA1833: Use AsSpan or AsMemory instead of Range-based indexers when appropriate +dotnet_diagnostic.CA1833.severity = warning + +# CA1834: Consider using 'StringBuilder.Append(char)' when applicable +dotnet_diagnostic.CA1834.severity = warning + +# CA1835: Prefer the 'Memory'-based overloads for 'ReadAsync' and 'WriteAsync' +dotnet_diagnostic.CA1835.severity = warning + +# CA1836: Prefer IsEmpty over Count +dotnet_diagnostic.CA1836.severity = warning + +# CA1837: Use 'Environment.ProcessId' +dotnet_diagnostic.CA1837.severity = warning + +# CA1838: Avoid 'StringBuilder' parameters for P/Invokes +dotnet_diagnostic.CA1838.severity = warning + +# CA1839: Use 'Environment.ProcessPath' +dotnet_diagnostic.CA1839.severity = warning + +# CA1840: Use 'Environment.CurrentManagedThreadId' +dotnet_diagnostic.CA1840.severity = warning + +# CA1841: Prefer Dictionary.Contains methods +dotnet_diagnostic.CA1841.severity = warning + +# CA1842: Do not use 'WhenAll' with a single task +dotnet_diagnostic.CA1842.severity = warning + +# CA1843: Do not use 'WaitAll' with a single task +dotnet_diagnostic.CA1843.severity = warning + +# CA1844: Provide memory-based overrides of async methods when subclassing 'Stream' +dotnet_diagnostic.CA1844.severity = warning + +# CA1845: Use span-based 'string.Concat' +dotnet_diagnostic.CA1845.severity = warning + +# CA1846: Prefer AsSpan over Substring +dotnet_diagnostic.CA1846.severity = warning + +# CA1847: Use string.Contains(char) instead of string.Contains(string) with single characters +dotnet_diagnostic.CA1847.severity = warning + +# CA1852: Seal internal types +dotnet_diagnostic.CA1852.severity = warning + +# CA1854: Prefer the IDictionary.TryGetValue(TKey, out TValue) method +dotnet_diagnostic.CA1854.severity = warning + +# CA1855: Prefer 'Clear' over 'Fill' +dotnet_diagnostic.CA1855.severity = warning + +# CA1856: Incorrect usage of ConstantExpected attribute +dotnet_diagnostic.CA1856.severity = error + +# CA1857: A constant is expected for the parameter +dotnet_diagnostic.CA1857.severity = warning + +# CA1858: Use 'StartsWith' instead of 'IndexOf' +dotnet_diagnostic.CA1858.severity = warning + +# CA2007: Consider calling ConfigureAwait on the awaited task +dotnet_diagnostic.CA2007.severity = none + +# CA2008: Do not create tasks without passing a TaskScheduler +dotnet_diagnostic.CA2008.severity = warning + +# CA2009: Do not call ToImmutableCollection on an ImmutableCollection value +dotnet_diagnostic.CA2009.severity = warning + +# CA2011: Avoid infinite recursion +dotnet_diagnostic.CA2011.severity = warning + +# CA2012: Use ValueTask correctly +dotnet_diagnostic.CA2012.severity = warning + +# CA2013: Do not use ReferenceEquals with value types +dotnet_diagnostic.CA2013.severity = warning + +# CA2014: Do not use stackalloc in loops. +dotnet_diagnostic.CA2014.severity = warning + +# CA2016: Forward the 'CancellationToken' parameter to methods that take one +dotnet_diagnostic.CA2016.severity = warning + +# CA2200: Rethrow to preserve stack details +dotnet_diagnostic.CA2200.severity = warning + +# CA2201: Do not raise reserved exception types +dotnet_diagnostic.CA2201.severity = warning + +# CA2208: Instantiate argument exceptions correctly +dotnet_diagnostic.CA2208.severity = warning + +# CA2245: Do not assign a property to itself +dotnet_diagnostic.CA2245.severity = warning + +# CA2246: Assigning symbol and its member in the same statement +dotnet_diagnostic.CA2246.severity = warning + +# CA2249: Use string.Contains instead of string.IndexOf to improve readability. +dotnet_diagnostic.CA2249.severity = warning + +# IDE0005: Remove unnecessary usings +dotnet_diagnostic.IDE0005.severity = warning + +# IDE0011: Curly braces to surround blocks of code +dotnet_diagnostic.IDE0011.severity = warning + +# IDE0020: Use pattern matching to avoid is check followed by a cast (with variable) +dotnet_diagnostic.IDE0020.severity = warning + +# IDE0029: Use coalesce expression (non-nullable types) +dotnet_diagnostic.IDE0029.severity = warning + +# IDE0030: Use coalesce expression (nullable types) +dotnet_diagnostic.IDE0030.severity = warning + +# IDE0031: Use null propagation +dotnet_diagnostic.IDE0031.severity = warning + +# IDE0035: Remove unreachable code +dotnet_diagnostic.IDE0035.severity = warning + +# IDE0036: Order modifiers +csharp_preferred_modifier_order = public,private,protected,internal,static,extern,new,virtual,abstract,sealed,override,readonly,unsafe,volatile,async:suggestion +dotnet_diagnostic.IDE0036.severity = warning + +# IDE0038: Use pattern matching to avoid is check followed by a cast (without variable) +dotnet_diagnostic.IDE0038.severity = warning + +# IDE0043: Format string contains invalid placeholder +dotnet_diagnostic.IDE0043.severity = warning + +# IDE0044: Make field readonly +dotnet_diagnostic.IDE0044.severity = warning + +# IDE0051: Remove unused private members +dotnet_diagnostic.IDE0051.severity = warning + +# IDE0055: All formatting rules +dotnet_diagnostic.IDE0055.severity = suggestion + +# IDE0059: Unnecessary assignment to a value +dotnet_diagnostic.IDE0059.severity = warning + +# IDE0060: Remove unused parameter +dotnet_code_quality_unused_parameters = non_public +dotnet_diagnostic.IDE0060.severity = warning + +# IDE0062: Make local function static +dotnet_diagnostic.IDE0062.severity = warning + +# IDE1006: Required naming style +dotnet_diagnostic.IDE1006.severity = warning + +# IDE0161: Convert to file-scoped namespace +dotnet_diagnostic.IDE0161.severity = warning + +# IDE0200: Lambda expression can be removed +dotnet_diagnostic.IDE0200.severity = warning + +# IDE2000: Disallow multiple blank lines +dotnet_style_allow_multiple_blank_lines_experimental = false +dotnet_diagnostic.IDE2000.severity = warning diff --git a/src/Legerity.sln b/src/Legerity.sln index 36afcdfc..a48e6ea9 100644 --- a/src/Legerity.sln +++ b/src/Legerity.sln @@ -45,16 +45,6 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Legerity.WCT.Tests", "..\te EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Legerity.Telerik.Uwp.Tests", "..\tests\Legerity.Telerik.Uwp.Tests\Legerity.Telerik.Uwp.Tests.csproj", "{10EB86E8-C74E-44AA-B5E8-C38BBC86B503}" EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Legerity.Templates.Android.NUnit", "..\tools\Legerity.Templates\templates\Legerity.Templates.Android.NUnit\Legerity.Templates.Android.NUnit.csproj", "{652E1951-1A5A-4BFB-B46A-D8DBF7A74E9E}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Legerity.Templates.CrossPlatform.NUnit", "..\tools\Legerity.Templates\templates\Legerity.Templates.CrossPlatform.NUnit\Legerity.Templates.CrossPlatform.NUnit.csproj", "{84A589E7-5B41-46E0-81D9-AB72283F2619}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Legerity.Templates.IOS.NUnit", "..\tools\Legerity.Templates\templates\Legerity.Templates.IOS.NUnit\Legerity.Templates.IOS.NUnit.csproj", "{AEAA37EF-1D8E-4C51-AF2B-27DB52E2C70C}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Legerity.Templates.Web.NUnit", "..\tools\Legerity.Templates\templates\Legerity.Templates.Web.NUnit\Legerity.Templates.Web.NUnit.csproj", "{5E638927-108F-47CB-974C-3F8F4CF7579F}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Legerity.Templates.Windows.NUnit", "..\tools\Legerity.Templates\templates\Legerity.Templates.Windows.NUnit\Legerity.Templates.Windows.NUnit.csproj", "{BE462D02-8DE7-4DB3-A2AB-6CED0A6ED4BC}" -EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -137,26 +127,6 @@ Global {10EB86E8-C74E-44AA-B5E8-C38BBC86B503}.Debug|Any CPU.Build.0 = Debug|Any CPU {10EB86E8-C74E-44AA-B5E8-C38BBC86B503}.Release|Any CPU.ActiveCfg = Release|Any CPU {10EB86E8-C74E-44AA-B5E8-C38BBC86B503}.Release|Any CPU.Build.0 = Release|Any CPU - {652E1951-1A5A-4BFB-B46A-D8DBF7A74E9E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {652E1951-1A5A-4BFB-B46A-D8DBF7A74E9E}.Debug|Any CPU.Build.0 = Debug|Any CPU - {652E1951-1A5A-4BFB-B46A-D8DBF7A74E9E}.Release|Any CPU.ActiveCfg = Release|Any CPU - {652E1951-1A5A-4BFB-B46A-D8DBF7A74E9E}.Release|Any CPU.Build.0 = Release|Any CPU - {84A589E7-5B41-46E0-81D9-AB72283F2619}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {84A589E7-5B41-46E0-81D9-AB72283F2619}.Debug|Any CPU.Build.0 = Debug|Any CPU - {84A589E7-5B41-46E0-81D9-AB72283F2619}.Release|Any CPU.ActiveCfg = Release|Any CPU - {84A589E7-5B41-46E0-81D9-AB72283F2619}.Release|Any CPU.Build.0 = Release|Any CPU - {AEAA37EF-1D8E-4C51-AF2B-27DB52E2C70C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {AEAA37EF-1D8E-4C51-AF2B-27DB52E2C70C}.Debug|Any CPU.Build.0 = Debug|Any CPU - {AEAA37EF-1D8E-4C51-AF2B-27DB52E2C70C}.Release|Any CPU.ActiveCfg = Release|Any CPU - {AEAA37EF-1D8E-4C51-AF2B-27DB52E2C70C}.Release|Any CPU.Build.0 = Release|Any CPU - {5E638927-108F-47CB-974C-3F8F4CF7579F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {5E638927-108F-47CB-974C-3F8F4CF7579F}.Debug|Any CPU.Build.0 = Debug|Any CPU - {5E638927-108F-47CB-974C-3F8F4CF7579F}.Release|Any CPU.ActiveCfg = Release|Any CPU - {5E638927-108F-47CB-974C-3F8F4CF7579F}.Release|Any CPU.Build.0 = Release|Any CPU - {BE462D02-8DE7-4DB3-A2AB-6CED0A6ED4BC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {BE462D02-8DE7-4DB3-A2AB-6CED0A6ED4BC}.Debug|Any CPU.Build.0 = Debug|Any CPU - {BE462D02-8DE7-4DB3-A2AB-6CED0A6ED4BC}.Release|Any CPU.ActiveCfg = Release|Any CPU - {BE462D02-8DE7-4DB3-A2AB-6CED0A6ED4BC}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE @@ -170,11 +140,6 @@ Global {74257F8D-E2F0-4327-B672-59F0530F2FD0} = {3024AB14-F3D4-4B9B-AF9D-64EBC00F5361} {C779A490-C926-4BF9-9165-0F407AA49A9F} = {3024AB14-F3D4-4B9B-AF9D-64EBC00F5361} {10EB86E8-C74E-44AA-B5E8-C38BBC86B503} = {3024AB14-F3D4-4B9B-AF9D-64EBC00F5361} - {652E1951-1A5A-4BFB-B46A-D8DBF7A74E9E} = {9064E354-7A64-4288-93E5-B3628CA12DD3} - {84A589E7-5B41-46E0-81D9-AB72283F2619} = {9064E354-7A64-4288-93E5-B3628CA12DD3} - {AEAA37EF-1D8E-4C51-AF2B-27DB52E2C70C} = {9064E354-7A64-4288-93E5-B3628CA12DD3} - {5E638927-108F-47CB-974C-3F8F4CF7579F} = {9064E354-7A64-4288-93E5-B3628CA12DD3} - {BE462D02-8DE7-4DB3-A2AB-6CED0A6ED4BC} = {9064E354-7A64-4288-93E5-B3628CA12DD3} EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution SolutionGuid = {FAB58D66-B3F1-408A-A96F-572170771367}