private static bool ProcessProject(string solutionPath, ProjectData projectData, Dictionary <ProjectKey, ProjectData> map) { var util = new ProjectUtil(projectData, map); var textWriter = new StringWriter(); if (!util.CheckAll(textWriter)) { Console.WriteLine($"Checking {projectData.FilePath} failed"); Console.WriteLine(textWriter.ToString()); return(false); } return(true); }
private static bool ProcessProject(string projectFilePath, ProjectData projectData) { var doc = XDocument.Load(projectFilePath); var projectType = projectData.ProjectType; var util = new ProjectUtil(projectType, projectFilePath, doc); var textWriter = new StringWriter(); if (!util.CheckAll(textWriter)) { Console.WriteLine($"Checking {projectData.RelativeFilePath} failed"); Console.WriteLine(textWriter.ToString()); return(false); } return(true); }
internal static int Main(string[] args) { string sourcePath; string configPath; if (!ParseArgs(args, out sourcePath, out configPath)) { Usage(); return(1); } var config = JsonConvert.DeserializeObject <BuildBossConfig>(File.ReadAllText(configPath)); var allGood = true; var list = new List <string>(); foreach (var projectPath in Directory.EnumerateFiles(sourcePath, "*proj", SearchOption.AllDirectories)) { var relativePath = GetRelativePath(sourcePath, projectPath); if (Exclude(config, relativePath)) { continue; } var doc = XDocument.Load(projectPath); var projectType = GetProjectType(projectPath); var util = new ProjectUtil(projectType, projectPath, doc); var textWriter = new StringWriter(); if (!util.CheckAll(textWriter)) { Console.WriteLine($"Checking {relativePath} failed"); Console.WriteLine(textWriter.ToString()); list.Add(relativePath); allGood = false; } } return(allGood ? 0 : 1); }