register

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Mar 20, 2024 License: GPL-3.0 Imports: 5 Imported by: 3

Documentation

Index

Constants

View Source
const (
	LoadModeSyntax    = "syntax"
	LoadModeTypesInfo = "typesinfo"
)

Plugins load mode.

Variables

This section is empty.

Functions

func DecodeSettings

func DecodeSettings[T any](rawSettings any) (T, error)

DecodeSettings decode settings from golangci-lint to the structure of the plugin configuration.

func Plugin

func Plugin(name string, p NewPlugin)

Plugin registers a plugin.

Types

type LinterPlugin

type LinterPlugin interface {
	BuildAnalyzers() ([]*analysis.Analyzer, error)
	GetLoadMode() string
}

LinterPlugin the interface of the plugin structure.

type NewPlugin

type NewPlugin func(conf any) (LinterPlugin, error)

NewPlugin the contract of the constructor of a plugin.

func GetPlugin

func GetPlugin(name string) (NewPlugin, error)

GetPlugin gets a plugin by name.

Jump to

Keyboard shortcuts

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