analyzers

package
v0.249.0 Latest Latest
Warning

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

Go to latest
Published: Jun 11, 2024 License: Apache-2.0 Imports: 20 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

Extractors is a list of all schema extractors that must run.

View Source
var Finalizer = &analysis.Analyzer{
	Name:             "finalizer",
	Doc:              "finalizes module schema and writes to the output destination",
	Run:              runFinalizer,
	Requires:         Extractors,
	ResultType:       reflect.TypeFor[ExtractResult](),
	RunDespiteErrors: true,
}

Finalizer aggregates the results of all extractors.

View Source
var TypeAliasExtractor = &analysis.Analyzer{
	Name:             "typealias",
	Doc:              "extracts type aliases to the module schema",
	Run:              extractTypeAliases,
	Requires:         []*analysis.Analyzer{inspect.Analyzer},
	ResultType:       reflect.TypeFor[result](),
	RunDespiteErrors: true,
}

TypeAliasExtractor extracts type aliases to the module schema.

Functions

This section is empty.

Types

type DiagnosticCategory

type DiagnosticCategory string
const (
	Info  DiagnosticCategory = "info"
	Warn  DiagnosticCategory = "warn"
	Error DiagnosticCategory = "error"
)

func (DiagnosticCategory) ToErrorLevel

func (e DiagnosticCategory) ToErrorLevel() schema.ErrorLevel

type ExtractResult

type ExtractResult struct {
	// Module is the extracted module schema.
	Module *schema.Module
	// NativeNames maps schema nodes to their native Go names.
	NativeNames map[schema.Node]string
	// Errors is a list of errors encountered during schema extraction.
	Errors []*schema.Error
}

ExtractResult contains the final schema extraction result.

type NativeNames

type NativeNames map[schema.Node]string

Jump to

Keyboard shortcuts

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