report

package
v0.2.4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 7, 2026 License: MIT Imports: 12 Imported by: 0

Documentation

Overview

Package report renders mode summaries to the user through clog: per-marker lines with smart file:line hyperlinks, plus a closing summary. It is the CLI-edge presentation layer - the engine returns data, report turns it into output. The logger is injected so output is testable and the pure core stays terminal-free.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Annotate

func Annotate(logger *clog.Logger, summary mode.AnnotateSummary, write bool)

Annotate renders the annotations clover added (or, in preview, would add), then a closing summary. A written line reads "Annotated"/"Reannotated" (🌱/♻️); in preview - the default, without --write - nothing is written, so each reads "Would add"/"Would update" and both it and the summary log at the Dry level.

func Format

func Format(logger *clog.Logger, summary mode.FormatSummary, dry bool)

Format renders the directives that were (or, when not writing, would be) reformatted, then a closing summary. A written line reads "Formatted" (✨); with dry set - under --check or --dry-run - nothing is written, so each line reads "Would format" and both it and the summary log at the Dry level.

func GitHub

func GitHub(w io.Writer, summary mode.Summary, dryRun bool)

GitHub writes each actionable result as a GitHub Actions annotation, so a run or lint surfaces inline on a pull request: a failure or pin-verification mismatch as ::error, a skip or available update as ::warning. file:line locate the marker. Clean results emit nothing.

func Lint

func Lint(logger *clog.Logger, summary mode.Summary, detail output.Mode)

Lint renders each invalid or skipped marker and a closing summary. In wide output, valid markers are reported too.

func Run

func Run(logger *clog.Logger, summary mode.Summary, dryRun bool, detail output.Mode)

Run renders a run's per-marker outcomes and a closing summary. A dry run logs the summary at the Dry level so the output itself signals nothing was written. In wide output, markers already up to date are reported too.

Types

This section is empty.

Directories

Path Synopsis
Package github builds GitHub Actions workflow-command annotations - the ::error/::warning/::notice lines a workflow parses from a step's output to surface a message inline on a pull request.
Package github builds GitHub Actions workflow-command annotations - the ::error/::warning/::notice lines a workflow parses from a step's output to surface a message inline on a pull request.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL