Reference
Reports and export formats
Scan results export from the Export menu in the main window, or from the CLI via --format.
Built-in formats
| Format | --format id | Extension | Best for |
|---|---|---|---|
| CSV | csv | .csv | Spreadsheets, pivot tables, sharing with non-Unity stakeholders |
| JSON | json | .json | Programmatic consumption, dashboards, custom tooling |
| HTML | html | .html | A standalone readable report to hand someone |
| Plain text | txt | .txt | Logs, quick diffs |
| Markdown | markdown | .md | Pasting into a PR description, issue, or wiki |
| GitHub Actions | github | — | Inline PR annotations |
| GitLab Code Quality | gitlab | .json | GitLab merge request quality reports |
CI-native formats
Two formats are designed for CI rather than humans.
GitHub Actions (--format github) emits workflow commands, so each issue appears as an annotation attached to the relevant file directly in the pull request diff — reviewers see broken references inline rather than digging through job logs.
GitLab Code Quality (--format gitlab) emits GitLab’s Code Quality report schema. Point your job’s artifacts:reports:codequality at the output and issues surface in the merge request widget.
Both are covered with working config in command line and CI.
Exporting from the editor
The Export menu lists every registered exporter as Export as {DisplayName}, including any custom ones you’ve added. Export respects the current filter state, so filtering to Critical issues and exporting produces a Critical-only report.
Exporting from script
using RefSafe.Pro;
// Look up a specific exporter by its id
IReportExporter exporter = ExporterRegistry.Find("json");
exporter?.Export(issues, "report.json");
// Or export by format id with error handling and logging
bool ok = ExporterRegistry.TryExport("html", issues, "report.html", log);
// Enumerate everything registered, including custom exporters
foreach (var entry in ExporterRegistry.All)
Debug.Log($"{entry.Id} → {entry.DisplayName} (.{entry.FileExtension})");
See ExporterRegistry for the full surface.
Custom exporters
Any format you need that isn’t listed can be added in a few lines by implementing IReportExporter and tagging it with [ReportExporter].
Custom exporters are first-class: they appear in the Export menu, work with --format on the CLI, and resolve through ExporterRegistry.Find. There’s no separate registration step.
using System.Collections.Generic;
using System.IO;
using RefSafe.Pro;
[ReportExporter("slack", "Slack Digest", "md")]
public sealed class SlackMarkdownExporter : IReportExporter
{
public void Export(IReadOnlyList<ScanIssue> issues, string filePath)
{
File.WriteAllText(filePath, $"*RefSafe*: {issues.Count} issues");
}
}
Exporter ids must be unique. Registering a duplicate id logs a warning and drops the second registration.
Full walkthrough in extending RefSafe Pro.