golangcilint

package
v0.2.5 Latest Latest
Warning

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

Go to latest
Published: Aug 8, 2020 License: GPL-3.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Issue

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

Issue is a wrapper of the issue model represented golangci-lint internally.

func NewIssues

func NewIssues(issues []result.Issue) []Issue

func (*Issue) Column

func (i *Issue) Column() int

func (*Issue) FilePath

func (i *Issue) FilePath() string

func (*Issue) FromLinter

func (i *Issue) FromLinter() string

func (*Issue) Line

func (i *Issue) Line() int

func (*Issue) Message

func (i *Issue) Message() string

func (*Issue) SourceLine added in v0.2.0

func (i *Issue) SourceLine() string

type Runner

type Runner struct {
	// Absolute path to the golangci-lint executable.
	Executable string
	// Args given to `golangci-lint run`.
	// An arg can be a file name, a workingDir, and in addition,
	// `...` to analyze them recursively.
	Args []string
	// Show only new issues created after git revision REV
	NewFromRev string
	// contains filtered or unexported fields
}

func NewRunner

func NewRunner(executable string, args []string, logger *logrus.Entry) (*Runner, error)

func (*Runner) AddArgs

func (r *Runner) AddArgs(arg string)

func (*Runner) ArgsString

func (r *Runner) ArgsString() string

func (*Runner) DisableLinter

func (r *Runner) DisableLinter(linterName string) error

func (*Runner) EnableLinter

func (r *Runner) EnableLinter(linterName string)

func (*Runner) GetVersion

func (r *Runner) GetVersion() string

func (*Runner) ListLinters

func (r *Runner) ListLinters() []config.Linter

ListLinters returns all linters, with settings about whether to enable or not.

func (*Runner) RemoveArgs

func (r *Runner) RemoveArgs(arg string)

func (*Runner) Run

func (r *Runner) Run() ([]Issue, error)

Run executes `golangci-lint run` with its own args and configuration.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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