diff --git a/tools/StaticAnalysis/BreakingChangeAnalyzer/BreakingChangeAnalyzer.cs b/tools/StaticAnalysis/BreakingChangeAnalyzer/BreakingChangeAnalyzer.cs index 92e996fee6cb..e7ab91233366 100644 --- a/tools/StaticAnalysis/BreakingChangeAnalyzer/BreakingChangeAnalyzer.cs +++ b/tools/StaticAnalysis/BreakingChangeAnalyzer/BreakingChangeAnalyzer.cs @@ -30,6 +30,7 @@ using Tools.Common.Loaders; using Tools.Common.Loggers; using Tools.Common.Models; +using Tools.Common.Utilities; namespace StaticAnalysis.BreakingChangeAnalyzer { @@ -97,7 +98,7 @@ public void Analyze( } foreach (var baseDirectory in cmdletProbingDirs.Where(s => !s.Contains("ServiceManagement") && - !s.Contains("Stack") && Directory.Exists(Path.GetFullPath(s)))) + !ModuleFilter.IsAzureStackModule(s) && Directory.Exists(Path.GetFullPath(s)))) { var probingDirectories = new List {baseDirectory}; diff --git a/tools/StaticAnalysis/BreakingChangeAttributesAnalyzer/BreakingChangeAttributesAnalyzer.cs b/tools/StaticAnalysis/BreakingChangeAttributesAnalyzer/BreakingChangeAttributesAnalyzer.cs index 531f8de928e7..4b8c1a43530f 100644 --- a/tools/StaticAnalysis/BreakingChangeAttributesAnalyzer/BreakingChangeAttributesAnalyzer.cs +++ b/tools/StaticAnalysis/BreakingChangeAttributesAnalyzer/BreakingChangeAttributesAnalyzer.cs @@ -28,6 +28,7 @@ using Tools.Common.Helpers; using Tools.Common.Issues; using Tools.Common.Loggers; +using Tools.Common.Utilities; namespace StaticAnalysis.BreakingChangeAttributesAnalyzer { @@ -104,7 +105,7 @@ public void Analyze(IEnumerable cmdletProbingDirs, Func !s.Contains("ServiceManagement") && - !s.Contains("Stack") && Directory.Exists(Path.GetFullPath(s)))) + !ModuleFilter.IsAzureStackModule(s) && Directory.Exists(Path.GetFullPath(s)))) { var probingDirectories = new List {baseDirectory}; diff --git a/tools/StaticAnalysis/SignatureVerifier/SignatureVerifier.cs b/tools/StaticAnalysis/SignatureVerifier/SignatureVerifier.cs index a7110bf1ec9c..c3a9ff47d75c 100644 --- a/tools/StaticAnalysis/SignatureVerifier/SignatureVerifier.cs +++ b/tools/StaticAnalysis/SignatureVerifier/SignatureVerifier.cs @@ -23,6 +23,7 @@ using Tools.Common.Loaders; using Tools.Common.Loggers; using Tools.Common.Models; +using Tools.Common.Utilities; namespace StaticAnalysis.SignatureVerifier { @@ -74,7 +75,7 @@ public void Analyze(IEnumerable cmdletProbingDirs, } foreach (var baseDirectory in cmdletProbingDirs.Where(s => !s.Contains("ServiceManagement") && - !s.Contains("Stack") && Directory.Exists(Path.GetFullPath(s)))) + !ModuleFilter.IsAzureStackModule(s) && Directory.Exists(Path.GetFullPath(s)))) { //Add current directory for probing probingDirectories.Add(baseDirectory); diff --git a/tools/Tools.Common/Tools.Common.Netcore.csproj b/tools/Tools.Common/Tools.Common.Netcore.csproj index 617353e43dab..fea8257ce3a6 100644 --- a/tools/Tools.Common/Tools.Common.Netcore.csproj +++ b/tools/Tools.Common/Tools.Common.Netcore.csproj @@ -26,6 +26,7 @@ + \ No newline at end of file diff --git a/tools/VersionController/Utilities/ModuleFilter.cs b/tools/Tools.Common/Utilities/ModuleFilter.cs similarity index 91% rename from tools/VersionController/Utilities/ModuleFilter.cs rename to tools/Tools.Common/Utilities/ModuleFilter.cs index e7f13e105452..8c070ff57b35 100644 --- a/tools/VersionController/Utilities/ModuleFilter.cs +++ b/tools/Tools.Common/Utilities/ModuleFilter.cs @@ -3,9 +3,9 @@ using System.Linq; using System.Reflection; -namespace VersionController.Utilities +namespace Tools.Common.Utilities { - class ModuleFilter + public class ModuleFilter { public static bool IsAzureStackModule(String fileName) { @@ -22,7 +22,7 @@ public static bool IsAzureStackModule(String fileName) var lines = File.ReadAllLines(whiteListFile).Skip(1).Where(c => !string.IsNullOrEmpty(c)); foreach (var line in lines) { - var cols = line.Split(",").Select(c => c.StartsWith("\"") ? c.Substring(1) : c) + var cols = line.Split(',').Select(c => c.StartsWith("\"") ? c.Substring(1) : c) .Select(c => c.EndsWith("\"") ? c.Substring(0, c.Length - 1) : c) .Select(c => c.Trim()).ToArray(); if (cols.Length >= 1) diff --git a/tools/VersionController/WhiteList.csv b/tools/Tools.Common/WhiteList.csv similarity index 100% rename from tools/VersionController/WhiteList.csv rename to tools/Tools.Common/WhiteList.csv diff --git a/tools/VersionController/Models/VersionBumper.cs b/tools/VersionController/Models/VersionBumper.cs index 664c68efba40..ccc27b341d38 100644 --- a/tools/VersionController/Models/VersionBumper.cs +++ b/tools/VersionController/Models/VersionBumper.cs @@ -7,7 +7,7 @@ using System.Reflection; using System.Text.RegularExpressions; using Tools.Common.Models; -using VersionController.Utilities; +using Tools.Common.Utilities; namespace VersionController.Models { diff --git a/tools/VersionController/Models/VersionFileHelper.cs b/tools/VersionController/Models/VersionFileHelper.cs index 31acb82bf5d5..a94e00c6b791 100644 --- a/tools/VersionController/Models/VersionFileHelper.cs +++ b/tools/VersionController/Models/VersionFileHelper.cs @@ -1,7 +1,7 @@ using System.Collections.Generic; using System.IO; using System.Linq; -using VersionController.Utilities; +using Tools.Common.Utilities; namespace VersionController.Models { diff --git a/tools/VersionController/Program.cs b/tools/VersionController/Program.cs index 032ca04525a8..c8ff9026ef41 100644 --- a/tools/VersionController/Program.cs +++ b/tools/VersionController/Program.cs @@ -7,7 +7,7 @@ using System.Reflection; using Tools.Common.Models; using VersionController.Models; -using VersionController.Utilities; +using Tools.Common.Utilities; namespace VersionController { diff --git a/tools/VersionController/VersionController.Netcore.csproj b/tools/VersionController/VersionController.Netcore.csproj index b8030c51dd78..84bdf70616cb 100644 --- a/tools/VersionController/VersionController.Netcore.csproj +++ b/tools/VersionController/VersionController.Netcore.csproj @@ -48,7 +48,6 @@ -