/// <summary> /// Aggregates together all of the files listed in the analysis results /// and returns the aggregated list /// </summary> public static IList <string> GetAllFiles(this ProjectInfo projectInfo) { List <String> files = new List <string>(); var compiledFilesPath = projectInfo.TryGetAnalysisFileLocation(AnalysisType.ManagedCompilerInputs); if (compiledFilesPath != null) { files.AddRange(File.ReadAllLines(compiledFilesPath)); } var contentFilesPath = projectInfo.TryGetAnalysisFileLocation(AnalysisType.ContentFiles); if (contentFilesPath != null) { files.AddRange(File.ReadAllLines(contentFilesPath)); } return(files); }
/// <summary> /// Returns the list of files to be analyzed. If there are no files to be analyzed /// then an empty list will be returned. /// </summary> public static IList <string> GetAllAnalysisFiles(this ProjectInfo projectInfo) { List <String> files = new List <string>(); var compiledFilesPath = projectInfo.TryGetAnalysisFileLocation(AnalysisType.FilesToAnalyze); if (compiledFilesPath != null && File.Exists(compiledFilesPath)) { files.AddRange(File.ReadAllLines(compiledFilesPath)); } return(files); }
private static string TryGetCodeCoverageReport(ProjectInfo project, ILogger logger) { string vsCoverageReport = project.TryGetAnalysisFileLocation(AnalysisType.VisualStudioCodeCoverage); if (vsCoverageReport != null) { if (!File.Exists(vsCoverageReport)) { vsCoverageReport = null; logger.LogWarning(Resources.WARN_CodeCoverageReportNotFound, vsCoverageReport); } } return vsCoverageReport; }
private static string TryGetFxCopReport(ProjectInfo project, ILogger logger) { string fxCopReport = project.TryGetAnalysisFileLocation(AnalysisType.FxCop); if (fxCopReport != null) { if (!File.Exists(fxCopReport)) { fxCopReport = null; logger.LogWarning(Resources.WARN_FxCopReportNotFound, fxCopReport); } } return fxCopReport; }