Compare issues and insights
Use the Report class to compare issues that Project Auditor finds.
Read time 1 minuteLast updated 13 days ago
You can save the object produced by Project Auditor's analysis as a .projectauditor file, or examine it via its API. contains a object with information about the analysis session, including a copy of the which Project Auditor used to configure the analysis. It also provides several methods to access the report's list of discovered instances. Each represents a single issue or insight: all the data for a single item in one of the tables that are available in the Project Auditor window.
ReportReportSessionInfoAnalysisParamsReportItemReportItemThe difference between issues and insights are that issues have a valid field and insights don't. There are a couple of ways to check this:
DescriptorIdbool isIssue = reportItem.Id.IsValid();// A slightly more readable alternative...bool isIssue = reportItem.IsIssue();
If you have a valid , you can use it to get the corresponding , which is the object that described a type of issue, including its details and recommendation strings.
DescriptorIdDescriptorvar descriptor = reportItem.Id.GetDescriptor();Debug.Log($"Id: {reportItem.Id.ToString()}");Debug.Log($"Description: {descriptor.Description}");Debug.Log($"Recommendation: {descriptor.Recommendation}");
Project Auditor also provides an API for creating custom analyzers tailored to the needs of your project. For more information, refer to Create custom analyzers.