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 ¶
- func ContextFromGossip(gctx *treesitter.AnalysisContext) *barrelman.AnalysisContext
- func DiagnosticToProtocol(d barrelman.Diagnostic) protocol.Diagnostic
- func DiagnosticsFromProtocol(diags []protocol.Diagnostic) []barrelman.Diagnostic
- func DiagnosticsToProtocol(diags []barrelman.Diagnostic) []protocol.Diagnostic
- func WrapForGossip(rule barrelman.Rule) treesitter.Analyzer
- type AnalysisData
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.