explain

package
v0.23.0 Latest Latest
Warning

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

Go to latest
Published: May 21, 2026 License: MIT Imports: 2 Imported by: 0

Documentation

Overview

Package explain attaches per-leaf rule provenance to lint diagnostics. It bridges internal/config (which computes a file's effective rule resolution) and internal/lint (which carries the optional Explanation payload on a Diagnostic), so the engine and fixer share one implementation rather than duplicating the loop.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Attach

func Attach(diags []lint.Diagnostic, cfg *config.Config, path string, fmKinds []string, fmFields map[string]any)

Attach populates Diagnostic.Explanation for each diag emitted at a file path using the rule's resolved per-leaf provenance.

Diagnostics whose RuleName is not present in the file's effective rule config are left untouched: the explain trailer is best-effort and never invents provenance for rules that were never resolved.

Types

This section is empty.

Jump to

Keyboard shortcuts

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