bridge

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Jun 8, 2026 License: MIT Imports: 8 Imported by: 0

Documentation

Overview

Package bridge adapts barrelman rules for the gossip LSP framework. This is the ONLY place gossip types appear in the rule execution chain.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ContextFromGossip

func ContextFromGossip(gctx *treesitter.AnalysisContext) *barrelman.AnalysisContext

ContextFromGossip builds a barrelman AnalysisContext from gossip's context.

func DiagnosticToProtocol

func DiagnosticToProtocol(d barrelman.Diagnostic) protocol.Diagnostic

DiagnosticToProtocol converts a single barrelman Diagnostic to protocol format.

func DiagnosticsFromProtocol

func DiagnosticsFromProtocol(diags []protocol.Diagnostic) []barrelman.Diagnostic

DiagnosticsFromProtocol converts gossip protocol diagnostics to barrelman format.

func DiagnosticsToProtocol

func DiagnosticsToProtocol(diags []barrelman.Diagnostic) []protocol.Diagnostic

DiagnosticsToProtocol converts barrelman diagnostics to gossip protocol format.

func WrapForGossip

func WrapForGossip(rule barrelman.Rule) treesitter.Analyzer

WrapForGossip converts a barrelman.Rule into a gossip treesitter.Analyzer.

Types

type AnalysisData

type AnalysisData struct {
	Index                        *openapi.Index
	Resolver                     barrelman.CrossRefResolver
	DocURI                       string
	TargetVersion                navigator.Version
	SuppressMalformedDiagnostics bool
}

AnalysisData bundles the per-document index with optional project-level cross-file resolution. Set as UserData on treesitter.AnalysisContext.

Jump to

Keyboard shortcuts

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