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.