From 3965e71138656acd160b738f05f093c7bfa788b7 Mon Sep 17 00:00:00 2001 From: James Jackson-South Date: Fri, 27 Nov 2020 13:52:47 +0000 Subject: [PATCH] Fix private instance field naming rules in Rider --- linting/.editorconfig | 24 ++++++++---------------- src/.editorconfig | 24 ++++++++---------------- src/Umbraco.Web/Umbraco.Web.csproj | 3 +-- 3 files changed, 17 insertions(+), 34 deletions(-) diff --git a/linting/.editorconfig b/linting/.editorconfig index abeb2801d2..66967e074f 100644 --- a/linting/.editorconfig +++ b/linting/.editorconfig @@ -333,14 +333,6 @@ dotnet_naming_rule.stylecop_instance_fields_must_be_private_rule.symbols 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 @@ -393,9 +385,16 @@ dotnet_naming_rule.type_parameter_rule.symbols = type_parameter_gro 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/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 + # Private static fields use camelCase and start with s_ dotnet_naming_symbols.private_static_field_symbols.applicable_accessibilities = private -dotnet_naming_symbols.private_static_field_symbols.required_modifiers = static,shared +dotnet_naming_symbols.private_static_field_symbols.required_modifiers = static, shared dotnet_naming_symbols.private_static_field_symbols.applicable_kinds = field dotnet_naming_rule.private_static_fields_must_be_camel_cased_and_prefixed_with_s_underscore.symbols = private_static_field_symbols dotnet_naming_rule.private_static_fields_must_be_camel_cased_and_prefixed_with_s_underscore.style = camel_case_and_prefix_with_s_underscore_style @@ -412,13 +411,6 @@ dotnet_naming_rule.private_instance_fields_must_be_camel_cased_and_prefixed_with dotnet_naming_style.camel_case_and_prefix_with_underscore_style.required_prefix = _ dotnet_naming_style.camel_case_and_prefix_with_underscore_style.capitalization = camel_case -# Function parameters use camelCase -# https://docs.microsoft.com/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 - ########################################## # License ########################################## diff --git a/src/.editorconfig b/src/.editorconfig index abeb2801d2..66967e074f 100644 --- a/src/.editorconfig +++ b/src/.editorconfig @@ -333,14 +333,6 @@ dotnet_naming_rule.stylecop_instance_fields_must_be_private_rule.symbols 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 @@ -393,9 +385,16 @@ dotnet_naming_rule.type_parameter_rule.symbols = type_parameter_gro 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/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 + # Private static fields use camelCase and start with s_ dotnet_naming_symbols.private_static_field_symbols.applicable_accessibilities = private -dotnet_naming_symbols.private_static_field_symbols.required_modifiers = static,shared +dotnet_naming_symbols.private_static_field_symbols.required_modifiers = static, shared dotnet_naming_symbols.private_static_field_symbols.applicable_kinds = field dotnet_naming_rule.private_static_fields_must_be_camel_cased_and_prefixed_with_s_underscore.symbols = private_static_field_symbols dotnet_naming_rule.private_static_fields_must_be_camel_cased_and_prefixed_with_s_underscore.style = camel_case_and_prefix_with_s_underscore_style @@ -412,13 +411,6 @@ dotnet_naming_rule.private_instance_fields_must_be_camel_cased_and_prefixed_with dotnet_naming_style.camel_case_and_prefix_with_underscore_style.required_prefix = _ dotnet_naming_style.camel_case_and_prefix_with_underscore_style.capitalization = camel_case -# Function parameters use camelCase -# https://docs.microsoft.com/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 - ########################################## # License ########################################## diff --git a/src/Umbraco.Web/Umbraco.Web.csproj b/src/Umbraco.Web/Umbraco.Web.csproj index 1b4ec244d8..9880984ecc 100644 --- a/src/Umbraco.Web/Umbraco.Web.csproj +++ b/src/Umbraco.Web/Umbraco.Web.csproj @@ -25,7 +25,6 @@ 4 false latest - ..\UnusedCode.ruleset portable @@ -314,4 +313,4 @@ - \ No newline at end of file +