From 29386cce81f64e7a6674f04270d8cf9bcffb7417 Mon Sep 17 00:00:00 2001 From: Chris Long Date: Fri, 15 Jul 2022 14:51:54 -0700 Subject: [PATCH 1/2] chore: update codelyzer reference --- .../packages.lock.json | 46 +++++++++---------- .../VisualBasicRulesAnalysis.cs | 5 +- src/CTA.Rules.Config/CTA.Rules.Config.csproj | 4 +- src/CTA.Rules.Models/packages.lock.json | 46 +++++++++---------- 4 files changed, 49 insertions(+), 52 deletions(-) diff --git a/src/CTA.FeatureDetection.Common/packages.lock.json b/src/CTA.FeatureDetection.Common/packages.lock.json index 975f246b..13960d3b 100644 --- a/src/CTA.FeatureDetection.Common/packages.lock.json +++ b/src/CTA.FeatureDetection.Common/packages.lock.json @@ -54,12 +54,12 @@ }, "Codelyzer.Analysis": { "type": "Transitive", - "resolved": "2.4.72-alpha-g154f8975ce", - "contentHash": "5t+uGKQVjm85toghCUBsM69wUfTVBxhYT+eCuZLceMiK4TbJ7MJwfCEfai3Qj41mnJ8g4yPIsMyGkCAARF/F0g==", + "resolved": "2.4.94", + "contentHash": "etSQMGoTxqlVmjsOXWzJSyd4xtujg1nfD3SEtCU5xTwVltJZvfl7o8s8arXVlF+trFujsn+PU/+j3VlY3f/iow==", "dependencies": { - "Codelyzer.Analysis.Build": "2.4.72-alpha-g154f8975ce", - "Codelyzer.Analysis.CSharp": "2.4.72-alpha-g154f8975ce", - "Codelyzer.Analysis.VisualBasic": "2.4.72-alpha-g154f8975ce", + "Codelyzer.Analysis.Build": "2.4.94", + "Codelyzer.Analysis.CSharp": "2.4.94", + "Codelyzer.Analysis.VisualBasic": "2.4.94", "CommandLineParser": "2.8.0", "Microsoft.Build.Utilities.Core": "17.1.0", "Microsoft.Extensions.Logging.Console": "6.0.0", @@ -69,23 +69,23 @@ }, "Codelyzer.Analysis.Build": { "type": "Transitive", - "resolved": "2.4.72-alpha-g154f8975ce", - "contentHash": "Ymx4lk0aILNUnjK/Ln7DvY84fV8rkeHbRjvXqmkMZvYgB35WtRSMw2qKMbmXUxeNP+evogviHgt6Cmcafn2n6Q==", + "resolved": "2.4.94", + "contentHash": "xNgGED9XCVX3Hwmij/FxaN7hvgzzulKtDu7uODWc4HwrJ3fl1dmku96fbl0x3zI0bY98G/j0r6Rb5etAOHtN0Q==", "dependencies": { "Buildalyzer": "4.1.4", "Buildalyzer.Logger": "4.1.4", "Buildalyzer.Workspaces": "4.1.4", - "Codelyzer.Analysis.Common": "2.4.72-alpha-g154f8975ce", + "Codelyzer.Analysis.Common": "2.4.94", "Microsoft.Extensions.Logging": "6.0.0", "NuGet.Packaging": "6.0.0" } }, "Codelyzer.Analysis.Common": { "type": "Transitive", - "resolved": "2.4.72-alpha-g154f8975ce", - "contentHash": "PNRf7eXbink/4MpEzUorwPZqiw0oh/Ac3hML5Q3+peCsWq8SWxy0Xj8eHfoxlQjaJ9tqkhWz1wzTx15wfmMUPw==", + "resolved": "2.4.94", + "contentHash": "L/jfOakcoetxVqmHmZNMiRcvixd7q6rfYWdgI7z2aSE2BSlGl23vsBx0MNJdYdBYZ6d61ZQ9SxwS2PFE4T+e8w==", "dependencies": { - "Codelyzer.Analysis.Model": "2.4.72-alpha-g154f8975ce", + "Codelyzer.Analysis.Model": "2.4.94", "Microsoft.Build": "17.0.0", "Microsoft.VisualStudio.Setup.Configuration.Interop": "3.1.2196", "Newtonsoft.Json": "13.0.1" @@ -93,17 +93,17 @@ }, "Codelyzer.Analysis.CSharp": { "type": "Transitive", - "resolved": "2.4.72-alpha-g154f8975ce", - "contentHash": "EknM1pQWlGb0dCZaPTdl4dJ35OV9Np2CgZ98iXPWKSSGjk+0TdJSPikQ6skbJ2iiqogyOpuycfJ5CXv64gx0VA==", + "resolved": "2.4.94", + "contentHash": "cb/SRIiHIVqo7YOnQxI3ATctpWiKRavIuXimOBcv1vjC9hk8BoPwezIcjtuBt5KSxHEsprPykjg6NXIvMFX+AA==", "dependencies": { - "Codelyzer.Analysis.Common": "2.4.72-alpha-g154f8975ce", - "Codelyzer.Analysis.Model": "2.4.72-alpha-g154f8975ce" + "Codelyzer.Analysis.Common": "2.4.94", + "Codelyzer.Analysis.Model": "2.4.94" } }, "Codelyzer.Analysis.Model": { "type": "Transitive", - "resolved": "2.4.72-alpha-g154f8975ce", - "contentHash": "rBpfp+QH75M5c4cOY/nMc1Kd7trfiDQfl86CZbS0nbe2fteK9F+V0t2wpEBKlitm/STD+NyBcED4jm013u8H8Q==", + "resolved": "2.4.94", + "contentHash": "IjGq1c21w5D58iMYe6Z1IryJHxgUgr7TnIySX5ileKNmq83KrnoYwaLqZ4Lu59WO6wA4WJv6bnUhtltBpXiZYA==", "dependencies": { "Microsoft.CodeAnalysis": "4.1.0", "Microsoft.CodeAnalysis.CSharp": "4.1.0", @@ -114,11 +114,11 @@ }, "Codelyzer.Analysis.VisualBasic": { "type": "Transitive", - "resolved": "2.4.72-alpha-g154f8975ce", - "contentHash": "taucX8Bw2QpqMDJRhoRx0AhXq8n6WTNwtvz/FbxAgQszwV4FrcAnEl6yrngB0kYumaABHSsjy/vFjmd6vCwsGw==", + "resolved": "2.4.94", + "contentHash": "M35CNh0vSUZEpA8AKlgD6k89PChP+C+Cf/uB50cwYP9ugYBMUkltoyRpLJDlP6M9N215jIY60HPEZDemCrKyDw==", "dependencies": { - "Codelyzer.Analysis.Common": "2.4.72-alpha-g154f8975ce", - "Codelyzer.Analysis.Model": "2.4.72-alpha-g154f8975ce" + "Codelyzer.Analysis.Common": "2.4.94", + "Codelyzer.Analysis.Model": "2.4.94" } }, "CommandLineParser": { @@ -1711,8 +1711,8 @@ "cta.rules.config": { "type": "Project", "dependencies": { - "Codelyzer.Analysis": "2.4.72-alpha-g154f8975ce", - "Codelyzer.Analysis.Model": "2.4.72-alpha-g154f8975ce", + "Codelyzer.Analysis": "2.4.94", + "Codelyzer.Analysis.Model": "2.4.94", "Microsoft.Extensions.Logging": "6.0.0", "Microsoft.Extensions.Logging.Abstractions": "6.0.0", "Microsoft.Extensions.Logging.Console": "6.0.0", diff --git a/src/CTA.Rules.Analysis/VisualBasicRulesAnalysis.cs b/src/CTA.Rules.Analysis/VisualBasicRulesAnalysis.cs index bd54e0cd..ce141813 100644 --- a/src/CTA.Rules.Analysis/VisualBasicRulesAnalysis.cs +++ b/src/CTA.Rules.Analysis/VisualBasicRulesAnalysis.cs @@ -287,10 +287,7 @@ private bool AnalyzeChildren(FileActions fileAction, UstList children, case IdConstants.AccessorBlockName: { var accessorType = (AccessorBlock)child; - var name = string.Concat( - accessorType.Reference != null - ? string.Concat(accessorType.Reference.Namespace, ".") - : string.Empty, accessorType.Identifier); + var name = accessorType.Identifier; var nameToken = new AccessorBlockToken { FullKey = name }; if (_visualBasicRootNodes.AccessorBlockTokens.TryGetValue(nameToken, out var token)) { diff --git a/src/CTA.Rules.Config/CTA.Rules.Config.csproj b/src/CTA.Rules.Config/CTA.Rules.Config.csproj index 55e26924..0cef0af2 100644 --- a/src/CTA.Rules.Config/CTA.Rules.Config.csproj +++ b/src/CTA.Rules.Config/CTA.Rules.Config.csproj @@ -5,8 +5,8 @@ - - + + diff --git a/src/CTA.Rules.Models/packages.lock.json b/src/CTA.Rules.Models/packages.lock.json index 181f99dd..b4016ed7 100644 --- a/src/CTA.Rules.Models/packages.lock.json +++ b/src/CTA.Rules.Models/packages.lock.json @@ -60,12 +60,12 @@ }, "Codelyzer.Analysis": { "type": "Transitive", - "resolved": "2.4.72-alpha-g154f8975ce", - "contentHash": "5t+uGKQVjm85toghCUBsM69wUfTVBxhYT+eCuZLceMiK4TbJ7MJwfCEfai3Qj41mnJ8g4yPIsMyGkCAARF/F0g==", + "resolved": "2.4.94", + "contentHash": "etSQMGoTxqlVmjsOXWzJSyd4xtujg1nfD3SEtCU5xTwVltJZvfl7o8s8arXVlF+trFujsn+PU/+j3VlY3f/iow==", "dependencies": { - "Codelyzer.Analysis.Build": "2.4.72-alpha-g154f8975ce", - "Codelyzer.Analysis.CSharp": "2.4.72-alpha-g154f8975ce", - "Codelyzer.Analysis.VisualBasic": "2.4.72-alpha-g154f8975ce", + "Codelyzer.Analysis.Build": "2.4.94", + "Codelyzer.Analysis.CSharp": "2.4.94", + "Codelyzer.Analysis.VisualBasic": "2.4.94", "CommandLineParser": "2.8.0", "Microsoft.Build.Utilities.Core": "17.1.0", "Microsoft.Extensions.Logging.Console": "6.0.0", @@ -75,23 +75,23 @@ }, "Codelyzer.Analysis.Build": { "type": "Transitive", - "resolved": "2.4.72-alpha-g154f8975ce", - "contentHash": "Ymx4lk0aILNUnjK/Ln7DvY84fV8rkeHbRjvXqmkMZvYgB35WtRSMw2qKMbmXUxeNP+evogviHgt6Cmcafn2n6Q==", + "resolved": "2.4.94", + "contentHash": "xNgGED9XCVX3Hwmij/FxaN7hvgzzulKtDu7uODWc4HwrJ3fl1dmku96fbl0x3zI0bY98G/j0r6Rb5etAOHtN0Q==", "dependencies": { "Buildalyzer": "4.1.4", "Buildalyzer.Logger": "4.1.4", "Buildalyzer.Workspaces": "4.1.4", - "Codelyzer.Analysis.Common": "2.4.72-alpha-g154f8975ce", + "Codelyzer.Analysis.Common": "2.4.94", "Microsoft.Extensions.Logging": "6.0.0", "NuGet.Packaging": "6.0.0" } }, "Codelyzer.Analysis.Common": { "type": "Transitive", - "resolved": "2.4.72-alpha-g154f8975ce", - "contentHash": "PNRf7eXbink/4MpEzUorwPZqiw0oh/Ac3hML5Q3+peCsWq8SWxy0Xj8eHfoxlQjaJ9tqkhWz1wzTx15wfmMUPw==", + "resolved": "2.4.94", + "contentHash": "L/jfOakcoetxVqmHmZNMiRcvixd7q6rfYWdgI7z2aSE2BSlGl23vsBx0MNJdYdBYZ6d61ZQ9SxwS2PFE4T+e8w==", "dependencies": { - "Codelyzer.Analysis.Model": "2.4.72-alpha-g154f8975ce", + "Codelyzer.Analysis.Model": "2.4.94", "Microsoft.Build": "17.0.0", "Microsoft.VisualStudio.Setup.Configuration.Interop": "3.1.2196", "Newtonsoft.Json": "13.0.1" @@ -99,17 +99,17 @@ }, "Codelyzer.Analysis.CSharp": { "type": "Transitive", - "resolved": "2.4.72-alpha-g154f8975ce", - "contentHash": "EknM1pQWlGb0dCZaPTdl4dJ35OV9Np2CgZ98iXPWKSSGjk+0TdJSPikQ6skbJ2iiqogyOpuycfJ5CXv64gx0VA==", + "resolved": "2.4.94", + "contentHash": "cb/SRIiHIVqo7YOnQxI3ATctpWiKRavIuXimOBcv1vjC9hk8BoPwezIcjtuBt5KSxHEsprPykjg6NXIvMFX+AA==", "dependencies": { - "Codelyzer.Analysis.Common": "2.4.72-alpha-g154f8975ce", - "Codelyzer.Analysis.Model": "2.4.72-alpha-g154f8975ce" + "Codelyzer.Analysis.Common": "2.4.94", + "Codelyzer.Analysis.Model": "2.4.94" } }, "Codelyzer.Analysis.Model": { "type": "Transitive", - "resolved": "2.4.72-alpha-g154f8975ce", - "contentHash": "rBpfp+QH75M5c4cOY/nMc1Kd7trfiDQfl86CZbS0nbe2fteK9F+V0t2wpEBKlitm/STD+NyBcED4jm013u8H8Q==", + "resolved": "2.4.94", + "contentHash": "IjGq1c21w5D58iMYe6Z1IryJHxgUgr7TnIySX5ileKNmq83KrnoYwaLqZ4Lu59WO6wA4WJv6bnUhtltBpXiZYA==", "dependencies": { "Microsoft.CodeAnalysis": "4.1.0", "Microsoft.CodeAnalysis.CSharp": "4.1.0", @@ -120,11 +120,11 @@ }, "Codelyzer.Analysis.VisualBasic": { "type": "Transitive", - "resolved": "2.4.72-alpha-g154f8975ce", - "contentHash": "taucX8Bw2QpqMDJRhoRx0AhXq8n6WTNwtvz/FbxAgQszwV4FrcAnEl6yrngB0kYumaABHSsjy/vFjmd6vCwsGw==", + "resolved": "2.4.94", + "contentHash": "M35CNh0vSUZEpA8AKlgD6k89PChP+C+Cf/uB50cwYP9ugYBMUkltoyRpLJDlP6M9N215jIY60HPEZDemCrKyDw==", "dependencies": { - "Codelyzer.Analysis.Common": "2.4.72-alpha-g154f8975ce", - "Codelyzer.Analysis.Model": "2.4.72-alpha-g154f8975ce" + "Codelyzer.Analysis.Common": "2.4.94", + "Codelyzer.Analysis.Model": "2.4.94" } }, "CommandLineParser": { @@ -1717,8 +1717,8 @@ "cta.rules.config": { "type": "Project", "dependencies": { - "Codelyzer.Analysis": "2.4.72-alpha-g154f8975ce", - "Codelyzer.Analysis.Model": "2.4.72-alpha-g154f8975ce", + "Codelyzer.Analysis": "2.4.94", + "Codelyzer.Analysis.Model": "2.4.94", "Microsoft.Extensions.Logging": "6.0.0", "Microsoft.Extensions.Logging.Abstractions": "6.0.0", "Microsoft.Extensions.Logging.Console": "6.0.0", From c87c806fdaea1ed3c8736fdb9ab68e29a8a92e63 Mon Sep 17 00:00:00 2001 From: Chris Long Date: Fri, 15 Jul 2022 17:00:20 -0700 Subject: [PATCH 2/2] fix: incorrect temp rule files name with change to codelyzer, the rule files must match the namespace exactly --- tst/CTA.Rules.Test/CTA.Rules.Test.csproj | 4 ++-- .../TempRules/{npoi.json => npoi.ss.usermodel.json} | 0 2 files changed, 2 insertions(+), 2 deletions(-) rename tst/CTA.Rules.Test/TempRules/{npoi.json => npoi.ss.usermodel.json} (100%) diff --git a/tst/CTA.Rules.Test/CTA.Rules.Test.csproj b/tst/CTA.Rules.Test/CTA.Rules.Test.csproj index d716884f..f63846ee 100644 --- a/tst/CTA.Rules.Test/CTA.Rules.Test.csproj +++ b/tst/CTA.Rules.Test/CTA.Rules.Test.csproj @@ -30,7 +30,7 @@ - + PreserveNewest @@ -77,7 +77,7 @@ - + PreserveNewest diff --git a/tst/CTA.Rules.Test/TempRules/npoi.json b/tst/CTA.Rules.Test/TempRules/npoi.ss.usermodel.json similarity index 100% rename from tst/CTA.Rules.Test/TempRules/npoi.json rename to tst/CTA.Rules.Test/TempRules/npoi.ss.usermodel.json