finding

package
v0.10.0 Latest Latest
Warning

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

Go to latest
Published: Oct 20, 2026 License: Apache-2.0 Imports: 1 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package finding defines the result type every rule evaluation produces.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Sort

func Sort(findings []Finding)

Sort orders findings deterministically by (RuleID, Path, Line, Message).

Types

type Finding

type Finding struct {
	RuleID   string
	Severity Severity
	Path     string
	Line     int
	Message  string

	// Suppressed marks a finding exempted by an inline formwork:allow marker
	// or an allowlist entry (spec §5). Suppressed findings never affect the
	// exit code; lint consumes them for staleness detection.
	Suppressed   bool
	SuppressedBy string // "marker" or "allowlist:<file>:<line>"
}

Finding is one rule violation. Path is repo-relative and slash-separated; it is empty for scope-level findings. Line is 1-based and zero when the finding is not anchored to a line.

func Unsuppressed

func Unsuppressed(fs []Finding) []Finding

Unsuppressed returns the findings not marked Suppressed, preserving order.

type Severity

type Severity string

Severity classifies a finding. Only error-severity findings affect the process exit code (spec §6).

const (
	SeverityError Severity = "error"
	SeverityWarn  Severity = "warn"
)

Jump to

Keyboard shortcuts

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