From f1e0f78b350d7c57b05287bd0400f6cc21d64702 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=9C=D0=B8=D1=85=D0=B0=D0=B8=D0=BB=20=D0=9F=D1=80=D0=BE?= =?UTF-8?q?=D0=BA=D0=B0=D0=B7=D0=B8=D0=BD?= Date: Sun, 26 Jul 2020 15:00:03 +0300 Subject: [PATCH] =?UTF-8?q?=D0=92=D0=BA=D0=BB=D1=8E=D1=87=D0=B5=D0=BD?= =?UTF-8?q?=D0=BE=20=D0=B8=D1=81=D0=BF=D0=BE=D0=BB=D1=8C=D0=B7=D0=BE=D0=B2?= =?UTF-8?q?=D0=B0=D0=BD=D0=B8=D0=B5=20=D1=84=D0=B0=D0=B9=D0=BB=D0=BE=D0=B2?= =?UTF-8?q?=20editorconfig=20=D0=BF=D1=80=D0=B8=20=D1=80=D0=B0=D0=B1=D0=BE?= =?UTF-8?q?=D1=82=D0=B5=20OmniSharp.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .editorconfig | 30 ++++++++++++++++++++++++++++++ .vscode/settings.json | 11 +++++++++++ Seterator.code-workspace | 8 +++++++- Seterator/GlobalSuppressions.cs | 18 ------------------ 4 files changed, 48 insertions(+), 19 deletions(-) create mode 100644 .vscode/settings.json delete mode 100644 Seterator/GlobalSuppressions.cs diff --git a/.editorconfig b/.editorconfig index 625f9e2..e555180 100644 --- a/.editorconfig +++ b/.editorconfig @@ -16,3 +16,33 @@ tab_width = unset [*.json] insert_final_newline = true + +[*.cs] +dotnet_diagnostic.CS8618.severity = suggestion +dotnet_diagnostic.RS2008.severity = none + +dotnet_sort_system_directives_first = true:warning +dotnet_separate_import_directive_groups = false +dotnet_style_object_initializer = true:suggestion +dotnet_style_collection_initializer = true:suggestion +dotnet_style_coalesce_expression = true:suggestion +dotnet_style_null_propagation = true:suggestion +dotnet_style_explicit_tuple_names = true:suggestion +csharp_style_pattern_matching_over_is_with_cast_check = true:suggestion +csharp_style_pattern_matching_over_as_with_null_check = true:suggestion +csharp_style_inlined_variable_declaration = true:suggestion +csharp_style_throw_expression = true:suggestion +csharp_style_conditional_delegate_call = true:suggestion + +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 + +csharp_style_var_for_built_in_types = true:suggestion +csharp_style_var_when_type_is_apparent = true:suggestion +csharp_style_var_elsewhere = true:suggestion + diff --git a/.vscode/settings.json b/.vscode/settings.json new file mode 100644 index 0000000..389dd52 --- /dev/null +++ b/.vscode/settings.json @@ -0,0 +1,11 @@ +{ + "editor.rulers": [ + 95 + ], + "omnisharp.enableEditorConfigSupport": true, + "omnisharp.enableRoslynAnalyzers": true, + "omnisharp.loggingLevel": "debug", + "[csharp]": { + "editor.defaultFormatter": "ms-dotnettools.csharp" + }, +} diff --git a/Seterator.code-workspace b/Seterator.code-workspace index 28ce15a..0c0230c 100644 --- a/Seterator.code-workspace +++ b/Seterator.code-workspace @@ -7,7 +7,13 @@ "settings": { "editor.rulers": [ 95 - ] + ], + "omnisharp.enableEditorConfigSupport": true, + "omnisharp.enableRoslynAnalyzers": true, + "omnisharp.loggingLevel": "debug", + "[csharp]": { + "editor.defaultFormatter": "ms-dotnettools.csharp" + }, }, "extensions": { "recommendations": [ diff --git a/Seterator/GlobalSuppressions.cs b/Seterator/GlobalSuppressions.cs deleted file mode 100644 index 3b8b902..0000000 --- a/Seterator/GlobalSuppressions.cs +++ /dev/null @@ -1,18 +0,0 @@ -// This file is used by Code Analysis to maintain SuppressMessage -// attributes that are applied to this project. -// Project-level suppressions either have no target or are given -// a specific target and scoped to a namespace, type, member, etc. - -[assembly: System.Diagnostics.CodeAnalysis.SuppressMessage("Naming", "CA1720:Identifier contains type name", Justification = "", Scope = "member", Target = "~M:Seterator.Controllers.ParticipantController.Edit(System.Guid)~Microsoft.AspNetCore.Mvc.IActionResult")] -[assembly: System.Diagnostics.CodeAnalysis.SuppressMessage("Style", "IDE0022:Use expression body for methods", Justification = "", Scope = "member", Target = "~M:Seterator.Controllers.ParticipantController.Edit(System.Guid)~Microsoft.AspNetCore.Mvc.IActionResult")] -[assembly: System.Diagnostics.CodeAnalysis.SuppressMessage("Design", "CA1062:Validate arguments of public methods", Justification = "", Scope = "member", Target = "~M:Seterator.Controllers.JuryController.Assessment(System.Guid,Seterator.Models.ParticipantAssessment)~Microsoft.AspNetCore.Mvc.IActionResult")] -[assembly: System.Diagnostics.CodeAnalysis.SuppressMessage("Globalization", "CA1303:Do not pass literals as localized parameters", Justification = "", Scope = "member", Target = "~M:Seterator.Controllers.Api.AccountController.Register(Seterator.Models.Api.Login)~Seterator.Models.Api.LoginResult")] -[assembly: System.Diagnostics.CodeAnalysis.SuppressMessage("Globalization", "CA1303:Do not pass literals as localized parameters", Justification = "", Scope = "member", Target = "~M:Seterator.Controllers.Api.AccountController.Post(Seterator.Models.Api.Login)~Seterator.Models.Api.LoginResult")] -[assembly: System.Diagnostics.CodeAnalysis.SuppressMessage("Globalization", "CA1303:Do not pass literals as localized parameters", Justification = "", Scope = "member", Target = "~M:Seterator.Controllers.Api.AccountController.Login(Seterator.Models.Api.Login)~Seterator.Models.Api.LoginResult")] -[assembly: System.Diagnostics.CodeAnalysis.SuppressMessage("Design", "CA1062:Validate arguments of public methods", Justification = "", Scope = "member", Target = "~M:Seterator.Controllers.Api.CompetitionController.Put(System.Guid,Seterator.Models.Competition)")] -[assembly: System.Diagnostics.CodeAnalysis.SuppressMessage("Design", "CA1062:Validate arguments of public methods", Justification = "", Scope = "member", Target = "~M:Seterator.Controllers.Api.CompetitionController.Post(Seterator.Models.Competition)")] -[assembly: System.Diagnostics.CodeAnalysis.SuppressMessage("Design", "CA1062:Validate arguments of public methods", Justification = "", Scope = "member", Target = "~M:Seterator.Controllers.Api.AccountController.Post(Seterator.Models.Api.Login)~Seterator.Models.Api.LoginResult")] -[assembly: System.Diagnostics.CodeAnalysis.SuppressMessage("Design", "CA1062:Validate arguments of public methods", Justification = "", Scope = "member", Target = "~M:Seterator.Controllers.AccountController.Register(Seterator.ViewModels.RegistrationModel)~System.Threading.Tasks.Task{Microsoft.AspNetCore.Mvc.IActionResult}")] -[assembly: System.Diagnostics.CodeAnalysis.SuppressMessage("Design", "CA1062:Validate arguments of public methods", Justification = "", Scope = "member", Target = "~M:Seterator.Controllers.AccountController.Register(Seterator.ViewModels.RegistrationModel)~System.Threading.Tasks.Task{Microsoft.AspNetCore.Mvc.IActionResult}")] -[assembly: System.Diagnostics.CodeAnalysis.SuppressMessage("Design", "CA1062:Validate arguments of public methods", Justification = "", Scope = "member", Target = "~M:Seterator.Controllers.Api.CompetitionController.Post(Seterator.Models.Competition)~Microsoft.AspNetCore.Mvc.IActionResult")] -[assembly: System.Diagnostics.CodeAnalysis.SuppressMessage("Design", "CA1031:Do not catch general exception types", Justification = "", Scope = "member", Target = "~M:Seterator.Controllers.Api.ProfileController.GetProfiles(Seterator.Models.Api.ProfileRequest)~Microsoft.AspNetCore.Mvc.IActionResult")]