lint

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Jul 7, 2024 License: GPL-3.0 Imports: 25 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ContextBuilder

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

func NewContextBuilder

func NewContextBuilder(cfg *config.Config, pkgLoader *PackageLoader,
	fileCache *fsutils.FileCache, pkgCache *pkgcache.Cache, loadGuard *load.Guard,
) *ContextBuilder

func (*ContextBuilder) Build

func (cl *ContextBuilder) Build(ctx context.Context, log logutils.Log, linters []*linter.Config) (*linter.Context, error)

type PackageLoader

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

PackageLoader loads packages based on golang.org/x/tools/go/packages.Load.

func NewPackageLoader

func NewPackageLoader(log logutils.Log, cfg *config.Config, args []string, goenv *goutil.Env, loadGuard *load.Guard) *PackageLoader

NewPackageLoader creates a new PackageLoader.

func (*PackageLoader) Load

func (l *PackageLoader) Load(ctx context.Context, linters []*linter.Config) (pkgs, deduplicatedPkgs []*packages.Package, err error)

Load loads packages.

type Runner

type Runner struct {
	Log logutils.Log

	Processors []processors.Processor
	// contains filtered or unexported fields
}

func NewRunner

func NewRunner(log logutils.Log, cfg *config.Config, args []string, goenv *goutil.Env,
	lineCache *fsutils.LineCache, fileCache *fsutils.FileCache,
	dbManager *lintersdb.Manager, lintCtx *linter.Context,
) (*Runner, error)

func (*Runner) Run

func (r *Runner) Run(ctx context.Context, linters []*linter.Config) ([]result.Issue, error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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