zplCore.comzplCore.com

ComplianceReport

public sealed class ComplianceReport

Result of ZplCompliance.Check: findings plus JSON, SARIF and text output.

Properties

PropertyTypeDescription
Dpi { get; }intResolution the millimetre values were computed with.
ErrorCount { get; }int
Findings { get; }IReadOnlyList<ComplianceFinding>All findings, ordered by label and source position.
HasErrors { get; }bool
InfoCount { get; }int
LabelCount { get; }intNumber of rendered labels.
Packs { get; }IReadOnlyList<ComplianceRulePack>The packs that were run.
Rules { get; }IReadOnlyList<(string, ComplianceRuleInfo)>The rules of all packs that were run plus the core rules (SARIF tool.driver.rules).
WarningCount { get; }int

Fields & Constants

FieldTypeDescription
const Disclaimer = "Pre-check against public specificati…"stringWording used in every output: this is a pre-check, not a certification.

Methods

Method SignatureReturnsDescription
# Fails(ComplianceSeverity failOn)boolTrue when a finding has at least severity failOn (for CI gates).
# ToJson(bool indented = true)stringFindings as JSON (tool, dpi, packs, summary, findings with bounds in dots and mm).
# ToSarif(string? artifactUri = default)stringSARIF 2.1.0 log (one run, all rules with citations, results with the ZPL line/column and the label area in properties) for GitHub code scanning and other SARIF viewers. artifactUri: Path of the checked file relative to the repository root (e.g. "labels/sscc.zpl").
# ToString()string
# ToText(string? fileName = default)stringPlain text: one line per finding and a summary line.
# WithFindings(IEnumerable<ComplianceFinding> findings)ComplianceReportA copy of this report with other findings (same packs, label count and dpi), e.g. filtered or with rewritten messages before ComplianceReport.ToSarif / ComplianceReport.ToJson.