diagnostics

package
v0.0.7 Latest Latest
Warning

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

Go to latest
Published: Sep 14, 2026 License: Apache-2.0 Imports: 21 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DecisiveSummary

func DecisiveSummary(output string) string

DecisiveSummary extracts the smallest useful failure signal from raw output.

func DiagnosticProviderIDs added in v0.0.7

func DiagnosticProviderIDs() []string

DiagnosticProviderIDs lists the edit-diagnostics providers in the order they are asked.

Types

type LanguageServerCheck added in v0.0.3

type LanguageServerCheck func(path string) (diagnostics []protocol.Diagnostic, checker string, unchecked string, handled bool)

LanguageServerCheck checks a file with its language server. It returns the diagnostics, the name of the server that produced them, why nothing checked the file when nothing did, and whether the file has a language at all. Supplied by the caller so this package does not depend on the code index.

type Result added in v0.0.3

type Result struct {
	Diagnostics []protocol.Diagnostic
	Checker     string
	Unchecked   string
}

Result is one file's check: what was found, and what did the finding.

Checker and Unchecked exist because an empty diagnostic list is ambiguous. Thirteen new TypeScript files produced no diagnostics and no way to tell "nothing wrong" from "nothing looked". Exactly one of them is set for a file Jade knows the language of; both are empty for files with no language (Markdown, a Dockerfile), where "not checked" on every edit would be noise.

type Service

type Service struct {
	// contains filtered or unexported fields
}

Service normalizes parser, LSP, and lint diagnostics.

func NewService

func NewService(root string) *Service

func (*Service) Check added in v0.0.3

func (s *Service) Check(scope string) Result

func (*Service) Checks added in v0.0.3

func (s *Service) Checks(scopes ...string) protocol.CheckReport

Checks reports which checkers ran on the files in scopes, and which files went unchecked and why, for an edit response.

func (*Service) Immediate

func (s *Service) Immediate(scope string) []protocol.Diagnostic

Immediate runs the fast, synchronous checks that fit within an edit's latency budget and returns their diagnostics. Check has the same result with the name of the checker that produced it.

func (*Service) UseLanguageServers added in v0.0.3

func (s *Service) UseLanguageServers(check LanguageServerCheck)

UseLanguageServers enables language-server diagnostics for every language with a configured server.

Jump to

Keyboard shortcuts

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