register

package
v0.1.2 Latest Latest
Warning

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

Go to latest
Published: May 19, 2025 License: Apache-2.0 Imports: 5 Imported by: 366 modules, 227 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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