Documentation
¶
Index ¶
Constants ¶
const Source = "vacuum"
Variables ¶
This section is empty.
Functions ¶
func Analyzer ¶
func Analyzer(engine *Engine, logger *slog.Logger) treesitter.Analyzer
Analyzer adapts the vacuum bridge into a gossip treesitter analyzer.
func Deduplicate ¶
func Deduplicate(primary []protocol.Diagnostic, secondary []protocol.Diagnostic) []protocol.Diagnostic
Deduplicate keeps all primary diagnostics and drops secondary diagnostics that collide on start position plus a canonical category bucket. The canonical bucket folds aliased rule pairs (for example aliased diagnostics onto a single key so reviewers see one row per underlying rule.
func DeduplicateWithin ¶
func DeduplicateWithin(diags []protocol.Diagnostic) []protocol.Diagnostic
DeduplicateWithin folds aliased rule IDs within a single diagnostic stream. Callers like the lintengine apply this after merging Barrelman + Vacuum results to ensure the combined set does not emit both a canonical slug and its vacuum/spectral/legacy alias for the same source location.
Types ¶
type Engine ¶
type Engine struct {
// contains filtered or unexported fields
}
Engine wraps pb33f/vacuum execution and maps results onto Telescope's existing diagnostic model.
func NewEngine ¶
NewEngine builds a Vacuum engine using the current process working directory for relative ruleset resolution.
func NewEngineWithBaseDir ¶
func NewEngineWithBaseDir(cfg config.VacuumConfig, baseDir string, logger *slog.Logger) (*Engine, error)
NewEngineWithBaseDir builds a Vacuum engine and resolves relative ruleset paths against baseDir.
func (*Engine) LintAndFix ¶
LintAndFix applies available vacuum auto-fixes and returns the updated bytes.