languageservice

package
v0.6.0 Latest Latest
Warning

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

Go to latest
Published: Jul 3, 2023 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var KEYWORDS = []string{
	"parameters", "description", "executor", "steps", "filters",
	"environment", "working_directory", "docker", "requires", "jobs", "triggers",
}
View Source
var PARAM_REGEX, _ = regexp.Compile(`<<\s*(parameters|pipeline.parameters)\.([A-z0-9-_]*)\s*>>`)
View Source
var ROOT_KEYWORDS = []string{
	"workflows", "jobs", "version", "commands",
	"executors", "parameters", "orbs", "setup",
}

Functions

func Complete

func Complete(params protocol.CompletionParams, cache *utils.Cache, context *utils.LsContext) (protocol.CompletionList, error)

func Definition

func Definition(params protocol.DefinitionParams, cache *utils.Cache, context *utils.LsContext) ([]protocol.Location, error)

func Diagnostic

func Diagnostic(params protocol.PublishDiagnosticsParams, cache *utils.Cache, context *utils.LsContext, schemaLocation string) protocol.PublishDiagnosticsParams

func DiagnosticFile

func DiagnosticFile(uri protocol.URI, cache *utils.Cache, context *utils.LsContext, schemaLocation string) ([]protocol.Diagnostic, error)

func DiagnosticString

func DiagnosticString(content string, cache *utils.Cache, context *utils.LsContext, schemaLocation string) ([]protocol.Diagnostic, error)

func DiagnosticYAML

func DiagnosticYAML(yamlDocument yamlparser.YamlDocument, cache *utils.Cache, context *utils.LsContext) ([]protocol.Diagnostic, error)

func DocumentSymbols

func DocumentSymbols(params protocol.DocumentSymbolParams, cache *utils.Cache, context *utils.LsContext) ([]protocol.DocumentSymbol, error)

func GetPathFromVisitedNodes

func GetPathFromVisitedNodes(visitedNodes []*sitter.Node, doc yamlparser.YamlDocument) []string

func Hover

func Hover(params protocol.HoverParams, cache *utils.Cache, context *utils.LsContext) (protocol.Hover, error)

func References

func References(params protocol.ReferenceParams, cache *utils.Cache, context *utils.LsContext) ([]protocol.Location, error)

func SemanticTokens

func SemanticTokens(params protocol.SemanticTokensParams, cache *utils.Cache, context *utils.LsContext) protocol.SemanticTokens

func Test

func Test(t *testing.T)

Types

type DiagnosticType

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

type ExpDiag

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

func ExpectDiagnostic

func ExpectDiagnostic(t *testing.T) ExpDiag

func (ExpDiag) File

func (root ExpDiag) File(context *utils.LsContext, uri protocol.URI) ExpDiagStruct

ExpectDiagnostic.File

func (ExpDiag) String

func (root ExpDiag) String(context *utils.LsContext, content string) ExpDiagStruct

ExpectDiagnostic.String

func (ExpDiag) Yaml

func (root ExpDiag) Yaml(yamlDocument parser.YamlDocument) ExpDiagStruct

ExpectDiagnostic.Yaml

type ExpDiagInfo

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

type ExpDiagStruct

type ExpDiagStruct struct {
	To ExpDiagTo
	// contains filtered or unexported fields
}

type ExpDiagTo

type ExpDiagTo struct {
	Not  ExpDiagToNot
	Have ExpDiagToHave
	// contains filtered or unexported fields
}

func (ExpDiagTo) Include

func (exp ExpDiagTo) Include(context *utils.LsContext, expected protocol.Diagnostic)

ExpectDiagnostic.<type>.To.Include

func (ExpDiagTo) IncludeAll

func (exp ExpDiagTo) IncludeAll(context *utils.LsContext, expected []protocol.Diagnostic)

ExpectDiagnostic.<type>.To.IncludeAll

type ExpDiagToHave

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

func (ExpDiagToHave) AnyParseError

func (exp ExpDiagToHave) AnyParseError()

ExpectDiagnostic.<type>.To.Have.AnyParseError()

func (ExpDiagToHave) ParseError

func (exp ExpDiagToHave) ParseError(parseError string)

ExpectDiagnostic.<type>.To.Have.ParseError()

type ExpDiagToNot

type ExpDiagToNot struct {
	Have ExpDiagToNotHave
	// contains filtered or unexported fields
}

func (ExpDiagToNot) Include

func (exp ExpDiagToNot) Include(context *utils.LsContext, expected protocol.Diagnostic)

ExpectDiagnostic.<type>.To.Not.Include

func (ExpDiagToNot) IncludeAll

func (exp ExpDiagToNot) IncludeAll(context *utils.LsContext, expected []protocol.Diagnostic)

ExpectDiagnostic.<type>.To.Not.IncludeAll

type ExpDiagToNotHave

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

func (ExpDiagToNotHave) AnyParseError

func (exp ExpDiagToNotHave) AnyParseError()

ExpectDiagnostic.<type>.To.Not.Have.AnyParseError()

func (ExpDiagToNotHave) ParseError

func (exp ExpDiagToNotHave) ParseError(parseError string)

ExpectDiagnostic.<type>.To.Not.Have.ParseError()

type ReferenceHandler

type ReferenceHandler struct {
	Doc        yamlparser.YamlDocument
	Params     protocol.ReferenceParams
	Cache      *utils.Cache
	FoundSteps *[]StepRangeAndName
}

func (ReferenceHandler) GetReferences

func (ref ReferenceHandler) GetReferences() ([]protocol.Location, error)

type SemanticTokenStruct

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

type StepRangeAndName

type StepRangeAndName struct {
	protocol.Range
	Name string
}

type Tokens

type Tokens struct {
	Position       protocol.Position
	Length         uint32
	TokenType      uint32
	TokenModifiers uint32
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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