problem

package
v0.0.3-alpha Latest Latest
Warning

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

Go to latest
Published: Sep 7, 2026 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Overview

Package problem defines the one shape a static-verification finding takes: a value, not a message. §12 fixes the members — file, line, column, field, error_code, message — and both of hyper check's renderings (§9) come from sorting and formatting one slice of this type.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Compare

func Compare(a, b Problem) int

Compare is that same order as a comparison, for the one caller that orders something which is not a Problem: a Run's Refusal is an ordered array whose order §7 fixes as "the order check prints in", and a second spelling of this comparison is where the day comes that a Refusal and a `check` over the same repository list the same faults differently (§7, §9).

func Sort

func Sort(problems []Problem)

Sort orders problems by file path, then by line, then by column, then by error_code — the order §9's "check [path...]" states.

Types

type Problem

type Problem struct {
	// File is the artefact's path, relative to the repository root, with
	// forward slashes regardless of platform.
	File string
	// Line and Column are 1-indexed positions in File. Column rides on the
	// wire only — the human table does not render it (§9).
	Line   int
	Column int
	// Field is a path into the artefact, in the notation §8's remediation
	// table uses: "steps[2].bound", "auth.token". It is empty where the
	// fault has no position more specific than the file itself.
	Field string
	// ErrorCode is one member of §12's closed error_code set.
	ErrorCode string
	// Message is free text describing the fault.
	Message string
}

Problem is one row of hyper check's output: a single fault at a single position. It carries no message-only shape — file, line and field are what make the next act an edit rather than a search (issue #88).

Jump to

Keyboard shortcuts

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