From f444425e5ad12ca6d7f78e41818eee843c9b4221 Mon Sep 17 00:00:00 2001 From: Sam Harwell Date: Fri, 5 Feb 2021 10:33:52 -0800 Subject: [PATCH] Configure severity in globalconfig instead of editorconfig --- .editorconfig | 11 ----------- eng/config/globalconfigs/Common.globalconfig | 12 ++++++++++++ 2 files changed, 12 insertions(+), 11 deletions(-) diff --git a/.editorconfig b/.editorconfig index 11619bbf56..6b7e1c3376 100644 --- a/.editorconfig +++ b/.editorconfig @@ -15,8 +15,6 @@ indent_size = 4 insert_final_newline = true encoding = utf-8-bom -# IDE0073: The file header is missing or not located at the top of the file -dotnet_diagnostic.IDE0073.severity = error file_header_template = Copyright (c) .NET Foundation. All rights reserved.\nLicensed under the Apache License, Version 2.0. See License.txt in the project root for license information. # Xml project files @@ -70,15 +68,6 @@ csharp_new_line_before_finally = true csharp_new_line_before_members_in_object_initializers = true csharp_new_line_before_members_in_anonymous_types = true -# IDE0051: Remove unused private members -dotnet_diagnostic.IDE0051.severity = warning - -# CS0219: Variable is assigned but its value is never used -dotnet_diagnostic.CS0219.severity = warning - -# IDE0005: Using directive is unnecessary. -dotnet_diagnostic.IDE0005.severity = warning - # IDE0058 csharp_style_unused_value_expression_statement_preference = discard_variable:none diff --git a/eng/config/globalconfigs/Common.globalconfig b/eng/config/globalconfigs/Common.globalconfig index e54576ca9f..fa220dafb9 100644 --- a/eng/config/globalconfigs/Common.globalconfig +++ b/eng/config/globalconfigs/Common.globalconfig @@ -1,5 +1,8 @@ is_global = true +# CS0219: Variable is assigned but its value is never used +dotnet_diagnostic.CS0219.severity = warning + # CA1303: Do not pass literals as localized parameters dotnet_diagnostic.CA1303.severity = none @@ -27,5 +30,14 @@ dotnet_diagnostic.CA2208.severity = none # CA2237: Mark ISerializable types with SerializableAttribute dotnet_diagnostic.CA2237.severity = none +# IDE0005: Using directive is unnecessary. +dotnet_diagnostic.IDE0005.severity = warning + +# IDE0051: Remove unused private members +dotnet_diagnostic.IDE0051.severity = warning + +# IDE0073: The file header is missing or not located at the top of the file +dotnet_diagnostic.IDE0073.severity = error + # VSSDK002: The PackageRegistrationAttribute.AllowsBackgroundLoading should be set to true if and only if the package derives from AsyncPackage dotnet_diagnostic.VSSDK002.severity = suggestion