From d2ea8b2a496991936d122ed2b917d9f7cfe536ea Mon Sep 17 00:00:00 2001 From: Arthur <44637996+Arthurvdv@users.noreply.github.com> Date: Mon, 13 Nov 2023 10:18:01 +0100 Subject: [PATCH 1/2] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index b8befc52..432bdca6 100644 --- a/README.md +++ b/README.md @@ -69,7 +69,7 @@ Further note that you should have BcContainerHelper version 2.0.16 (or newer) in |[LC0025](https://github.com/StefanMaron/BusinessCentral.LinterCop/wiki/LC0025)|Procedure must be either local or internal.|Info| |[LC0026](https://github.com/StefanMaron/BusinessCentral.LinterCop/wiki/LC0026)|ToolTip must end with a dot.|Info| |[LC0027](https://github.com/StefanMaron/BusinessCentral.LinterCop/wiki/LC0027)|`Page.Run()` and `Page.RunModal()` must be implemented through the `Page Management` codeunit from the Base Application.|Info| -|[LC0028](https://github.com/StefanMaron/BusinessCentral.LinterCop/wiki/LC0028)|Event subscriber arguments now use identifier syntax instead of string literals. Convert the argument literal to an identifier.|Info| +|[LC0028](https://github.com/StefanMaron/BusinessCentral.LinterCop/wiki/LC0028)|Event subscriber arguments now use identifier syntax instead of string literals.|Info| |[LC0029](https://github.com/StefanMaron/BusinessCentral.LinterCop/wiki/LC0029)|Use `CompareDateTime` method in `Type Helper` codeunit for DateTime variable comparisons.|Info| ## Configuration From 47033820fa8af2558662657a98bcd9f0055cef2b Mon Sep 17 00:00:00 2001 From: Arthur van de Vondervoort Date: Mon, 13 Nov 2023 14:01:53 +0100 Subject: [PATCH 2/2] Resolve false positive on use of namespaces --- Design/Rule0003DoNotUseObjectIDsInVariablesOrProperties.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Design/Rule0003DoNotUseObjectIDsInVariablesOrProperties.cs b/Design/Rule0003DoNotUseObjectIDsInVariablesOrProperties.cs index 01a6366b..b50e62b6 100644 --- a/Design/Rule0003DoNotUseObjectIDsInVariablesOrProperties.cs +++ b/Design/Rule0003DoNotUseObjectIDsInVariablesOrProperties.cs @@ -68,10 +68,10 @@ private void CheckForObjectIDsInVariablesOrProperties(SyntaxNodeAnalysisContext if (property.PropertyKind != PropertyKind.Permissions && property.PropertyKind != PropertyKind.AccessByPermission) { - if (ctx.Node.ToString().Trim('"').ToUpper() != property.ValueText.ToUpper()) + if (ctx.Node.GetLastToken().ToString().Trim('"').ToUpper() != property.ValueText.ToUpper()) ctx.ReportDiagnostic(Diagnostic.Create(DiagnosticDescriptors.Rule0003DoNotUseObjectIDsInVariablesOrProperties, ctx.Node.GetLocation(), new object[] { ctx.Node.ToString().Trim('"'), property.ValueText })); - if (ctx.Node.ToString().Trim('"') != property.ValueText) + if (ctx.Node.GetLastToken().ToString().Trim('"') != property.ValueText) ctx.ReportDiagnostic(Diagnostic.Create(DiagnosticDescriptors.Rule0005VariableCasingShouldNotDIfferFromDeclaration, ctx.Node.GetLocation(), new object[] { property.ValueText, "" })); } }