From bbda7ab6cf59b5eccfd63639d31bee9073a0d582 Mon Sep 17 00:00:00 2001 From: "Samuele E. Locatelli" Date: Wed, 15 Jul 2020 18:37:02 +0200 Subject: [PATCH] Update config x segnalazione errori/violazioni --- .editorconfig | 9 +++++++++ NKC_WF/site/DevUtils.aspx.cs | 16 ++++++++-------- NKC_WF/site/ErrorsLog.aspx.cs | 20 ++++++++++---------- 3 files changed, 27 insertions(+), 18 deletions(-) diff --git a/.editorconfig b/.editorconfig index 32a8a48..063703e 100644 --- a/.editorconfig +++ b/.editorconfig @@ -2,3 +2,12 @@ # IDE0058: Il valore dell'espressione non viene mai usato csharp_style_unused_value_expression_statement_preference = discard_variable:none + +# IDE1006: Stili di denominazione +dotnet_diagnostic.IDE1006.severity = none + +# CA5368: Impostare ViewStateUserKey per classi derivate da Page +dotnet_diagnostic.CA5368.severity = none + +# CA1707: Gli identificatori non devono contenere caratteri di sottolineatura +dotnet_diagnostic.CA1707.severity = none diff --git a/NKC_WF/site/DevUtils.aspx.cs b/NKC_WF/site/DevUtils.aspx.cs index 454aa9a..8cfc58e 100644 --- a/NKC_WF/site/DevUtils.aspx.cs +++ b/NKC_WF/site/DevUtils.aspx.cs @@ -7,14 +7,14 @@ using System.Web.UI.WebControls; namespace NKC_WF { - public partial class DevUtils : System.Web.UI.Page - { - protected void Page_Load(object sender, EventArgs e) + public partial class DevUtils : System.Web.UI.Page { - if (!Page.IsPostBack) - { - ((SiteMaster)this.Master).showSearch = false; - } + protected void Page_Load(object sender, EventArgs e) + { + if (!Page.IsPostBack) + { + ((SiteContent)this.Master).showSearch = false; + } + } } - } } \ No newline at end of file diff --git a/NKC_WF/site/ErrorsLog.aspx.cs b/NKC_WF/site/ErrorsLog.aspx.cs index 973883f..f6dc24b 100644 --- a/NKC_WF/site/ErrorsLog.aspx.cs +++ b/NKC_WF/site/ErrorsLog.aspx.cs @@ -4,18 +4,18 @@ using System.Web.UI; namespace NKC_WF { - public partial class ErrorsLog : System.Web.UI.Page - { - protected void Page_Load(object sender, EventArgs e) + public partial class ErrorsLog : System.Web.UI.Page { - if (!Page.IsPostBack) - { - string PUID = memLayer.ML.QSS("PUID"); - if (PUID != "") + protected void Page_Load(object sender, EventArgs e) { - cmp_ErrorsLog.Puid = PUID; + if (!Page.IsPostBack) + { + string PUID = memLayer.ML.QSS("PUID"); + if (!string.IsNullOrEmpty(PUID)) + { + cmp_ErrorsLog.Puid = PUID; + } + } } - } } - } } \ No newline at end of file