diagnostics

package
v0.0.0-...-e49a3f0 Latest Latest
Warning

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

Go to latest
Published: Dec 20, 2023 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Analyzer

type Analyzer interface {
	Name() string
	Analyze(ctx context.Context, path string, code []byte) ([]protocol.Diagnostic, error)
	AnalyzeSave(ctx context.Context, path string) ([]protocol.Diagnostic, error)
}

type Closer

type Closer interface {
	Close()
}

Implement closer to do clean up (stopping a daemon for example).

type PhpcsAnalyzer

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

func MakePhpcs

func MakePhpcs(executable string) *PhpcsAnalyzer

func (*PhpcsAnalyzer) Analyze

func (p *PhpcsAnalyzer) Analyze(
	ctx context.Context,
	path string,
	code []byte,
) ([]protocol.Diagnostic, error)

func (*PhpcsAnalyzer) AnalyzeSave

func (p *PhpcsAnalyzer) AnalyzeSave(
	ctx context.Context,
	path string,
) ([]protocol.Diagnostic, error)

func (*PhpcsAnalyzer) Close

func (p *PhpcsAnalyzer) Close()

func (*PhpcsAnalyzer) Name

func (p *PhpcsAnalyzer) Name() string

type PhpstanAnalyzer

type PhpstanAnalyzer struct {
	Executable string
}

func (*PhpstanAnalyzer) Analyze

func (p *PhpstanAnalyzer) Analyze(
	ctx context.Context,
	path string,
	code []byte,
) ([]protocol.Diagnostic, error)

func (*PhpstanAnalyzer) AnalyzeSave

func (p *PhpstanAnalyzer) AnalyzeSave(
	ctx context.Context,
	path string,
) ([]protocol.Diagnostic, error)

func (*PhpstanAnalyzer) Name

func (p *PhpstanAnalyzer) Name() string

type Runner

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

func NewRunner

func NewRunner(
	client protocol.Client,
	analyzers []Analyzer,
	saveAnalyzers []Analyzer,
) *Runner

func NewRunnerFromConfig

func NewRunnerFromConfig(client protocol.Client) *Runner

func (*Runner) AddDiagnostics

func (r *Runner) AddDiagnostics(path string, version int, diagnostics []protocol.Diagnostic)

func (*Runner) AddSaveDiagnostics

func (r *Runner) AddSaveDiagnostics(path string, version int, diagnostics []protocol.Diagnostic)

func (*Runner) Close

func (r *Runner) Close()

func (*Runner) Publish

func (r *Runner) Publish(ctx context.Context, path string) error

func (*Runner) Run

func (r *Runner) Run(ctx context.Context, version int, path string, code []byte) error

func (*Runner) StopWatching

func (r *Runner) StopWatching(path string) error

func (*Runner) Watch

func (r *Runner) Watch(path string) error

Jump to

Keyboard shortcuts

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