/// <summary>
        /// Get the validation suite report for the given package id.
        /// </summary>
        /// <param name="packageId">Package Id in the format of [package name]@[package version].</param>
        /// <returns>The validation suite report as a string.</returns>
        public static string GetValidationSuiteReport(string packageId)
        {
            if (string.IsNullOrEmpty(packageId))
            {
                throw new ArgumentNullException(packageId);
            }

            return(ValidationSuiteReport.ReportExists(packageId) ? File.ReadAllText(TextReport.ReportPath(packageId)) : null);
        }
        public ValidationSuiteReport(string packageId, string packageName, string packageVersion, string packagePath)
        {
            jsonReportPath = Path.Combine(ResultsPath, packageId + ".json");

            if (!Directory.Exists(ResultsPath))
            {
                Directory.CreateDirectory(ResultsPath);
            }

#if !UNITY_PACKAGE_MANAGER_DEVELOP_EXISTS
            TextReport = new TextReport(packageId, packageVersion);
#endif
            TextReport?.Clear();

            if (File.Exists(jsonReportPath))
            {
                File.Delete(jsonReportPath);
            }
        }
 public static bool ReportExists(string packageId)
 {
     return(TextReport.ReportExists(packageId));
 }
 internal void Initialize(VettingContext context)
 {
     TextReport?.Initialize(context);
 }
 public void GenerateTextReport(ValidationSuite suite)
 {
     TextReport?.GenerateReport(suite);
 }
 public void OutputErrorReport(string error)
 {
     TextReport?.Append(error);
     ActivityLogger.Log(error);
 }