From 46fe8e4bf02872ce54748b77556093c0f8b070a1 Mon Sep 17 00:00:00 2001 From: "Szabo, Peter" Date: Wed, 10 Feb 2021 10:09:57 +0700 Subject: [PATCH 1/4] Improve error message --- src/Agoda.Analyzers/AgodaCustom/CustomRulesResources.resx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Agoda.Analyzers/AgodaCustom/CustomRulesResources.resx b/src/Agoda.Analyzers/AgodaCustom/CustomRulesResources.resx index dfc436f..debb05f 100644 --- a/src/Agoda.Analyzers/AgodaCustom/CustomRulesResources.resx +++ b/src/Agoda.Analyzers/AgodaCustom/CustomRulesResources.resx @@ -198,7 +198,7 @@ Prevent use of dynamic - Ensure that publicly exposed IEnumerable types + Invalid return type. Publicly exposed enumerable types must be on our whitelist. Use only CSS Selectors to find elements in Selenium tests From 9fcfd86d8f7b73ba11bcdd0a648fdd70a3a2e776 Mon Sep 17 00:00:00 2001 From: "Szabo, Peter" Date: Wed, 10 Feb 2021 10:10:37 +0700 Subject: [PATCH 2/4] Improve comment to match rule name --- .../AgodaCustom/CustomRulesResources.Designer.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Agoda.Analyzers/AgodaCustom/CustomRulesResources.Designer.cs b/src/Agoda.Analyzers/AgodaCustom/CustomRulesResources.Designer.cs index 46e4f46..c4f60fb 100644 --- a/src/Agoda.Analyzers/AgodaCustom/CustomRulesResources.Designer.cs +++ b/src/Agoda.Analyzers/AgodaCustom/CustomRulesResources.Designer.cs @@ -232,7 +232,7 @@ public static string AG0013Title { } /// - /// Looks up a localized string similar to Ensure that publicly exposed IEnumerable types. + /// Looks up a localized string similar to AG0018: Ensure that publicly exposed enumerable types are on our whitelist. /// public static string AG0018Title { get { From cf928e750f1c24dd76ff53ac597005b25fbefa51 Mon Sep 17 00:00:00 2001 From: "Szabo, Peter" Date: Wed, 10 Feb 2021 10:10:53 +0700 Subject: [PATCH 3/4] Match copyright note with filename --- .../AG0018PermitOnlyCertainPubliclyExposedEnumerables.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Agoda.Analyzers/AgodaCustom/AG0018PermitOnlyCertainPubliclyExposedEnumerables.cs b/src/Agoda.Analyzers/AgodaCustom/AG0018PermitOnlyCertainPubliclyExposedEnumerables.cs index c657fd6..51770a7 100644 --- a/src/Agoda.Analyzers/AgodaCustom/AG0018PermitOnlyCertainPubliclyExposedEnumerables.cs +++ b/src/Agoda.Analyzers/AgodaCustom/AG0018PermitOnlyCertainPubliclyExposedEnumerables.cs @@ -1,4 +1,4 @@ -// +// // AGODA ® is a registered trademark of AGIP LLC, used under license by Agoda Company Co., Ltd.. Agoda is part of Priceline (NASDAQ:PCLN) // using System.Collections.Immutable; From 5f80f52fa3f7b4aea8e9d8252966ca9cedf9896f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Szab=C3=B3=2C=20P=C3=A9ter?= Date: Wed, 10 Feb 2021 10:48:12 +0700 Subject: [PATCH 4/4] Update src/Agoda.Analyzers/AgodaCustom/CustomRulesResources.resx Co-authored-by: Joel Dickson --- src/Agoda.Analyzers/AgodaCustom/CustomRulesResources.resx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Agoda.Analyzers/AgodaCustom/CustomRulesResources.resx b/src/Agoda.Analyzers/AgodaCustom/CustomRulesResources.resx index debb05f..fee6462 100644 --- a/src/Agoda.Analyzers/AgodaCustom/CustomRulesResources.resx +++ b/src/Agoda.Analyzers/AgodaCustom/CustomRulesResources.resx @@ -198,7 +198,7 @@ Prevent use of dynamic - Invalid return type. Publicly exposed enumerable types must be on our whitelist. + Strong return type, we recommend using interfaces over the concrete implementations. Publicly exposed enumerable types must be on our whitelist. e.g. IList, IEnum, etc. Use only CSS Selectors to find elements in Selenium tests @@ -248,4 +248,4 @@ One exception is logging, where it can be useful to see the exact DC / cluster / Do not use #region directives - \ No newline at end of file +