zplCore.comzplCore.com

ZplCheckResult

public sealed class ZplCheckResult

Result of ZplCheck.Run with the CI output formats.

Properties

PropertyTypeDescription
ChangedFiles { get; }intFiles that changed against the baseline or are new.
ExitCode { get; }intProcess exit code: 0 passed, 1 failed.
Failed { get; }boolTrue when any check failed (findings at ZplCheckOptions.FailOn or above, or a check error).
FailedFiles { get; }intFiles with a failed check.
Files { get; }IReadOnlyList<CheckedFile>Every checked file, sorted by path.
Findings { get; }IEnumerable<CheckFinding>All findings of all files.
Options { get; }ZplCheckOptionsThe options of the run.
Root { get; }stringAbsolute root the relative paths refer to.
Seconds { get; }doubleDuration of the run.

Methods

Method SignatureReturnsDescription
# Count(CheckSeverity s)intNumber of findings of severity s.
# ToGitHubAnnotations()stringGitHub Actions workflow commands (::error file=…,line=…::…): inline annotations without code scanning.
# ToJUnit()stringJUnit XML: one <testsuite> per file, one <testcase> per check. Valid against the Ant/windyroad JUnit schema and the Surefire/Jenkins junit-10 schema (GitHub test reporters, Azure DevOps, GitLab, Jenkins).
# ToJson()stringMachine-readable result (files, cases, findings, changes, images).
# ToMarkdown(MarkdownOptions? options = default)stringMarkdown for a pull request comment or the job summary: overview table, then per changed or failing file the before / after / diff images (when MarkdownOptions.ImageUrl gives URLs), the semantic changes and the findings.
# ToSarif()stringSARIF 2.1.0 with one run (tool "zplCore label check") for GitHub code scanning: rules of the compliance packs (ZPL3xxx, with citations), scan-proof (SPxxxx) and the testing checks (ZTxxxx); results with file, line, column and the label area in properties.boundsDots. Notes (baseline changes) are included as level "note".
# ToText()stringConsole text: one block per file, findings as path:line:col: error RULE: message (compiler style, works with problem matchers).