Documentation ¶
Overview ¶
Package golangcilint provides a task for the "github.com/golangci/golangci-lint/cmd/golangci-lint" Go module command. "golangci-lint" a fast, parallel runner for dozens of Go linters that uses caching, supports YAML configurations and has integrations with all major IDEs.
See https://pkg.go.dev/github.com/golangci/golangci-lint for more details about "golangci-lint". The source code of "golangci-lint" is available at https://github.com/golangci/golangci-lint/tree/master/cmd/golangci-lint.
Index ¶
Constants ¶
const ( // DefaultGoModulePath is the default module import path. DefaultGoModulePath = "github.com/golangci/golangci-lint/cmd/golangci-lint" // DefaultGoModuleVersion is the default module version. DefaultGoModuleVersion = "v1.43.0" )
Variables ¶
var DefaultArgs = []string{"run"}
DefaultArgs are default arguments passed to the command.
Functions ¶
This section is empty.
Types ¶
type Option ¶
type Option func(*Options)
Option is a task option.
func WithModulePath ¶
WithModulePath sets the module import path. Defaults to DefaultGoModulePath.
func WithModuleVersion ¶
func WithModuleVersion(version *semver.Version) Option
WithModuleVersion sets the module version. Defaults to DefaultGoModuleVersion.
func WithVerboseOutput ¶
WithVerboseOutput indicates whether the output should be verbose.
type Options ¶
type Options struct {
// contains filtered or unexported fields
}
Options are task options.
func NewOptions ¶
NewOptions creates new task options.
type Task ¶
type Task struct {
// contains filtered or unexported fields
}
Task is a task for the "github.com/golangci/golangci-lint/cmd/golangci-lint" Go module command.
func New ¶
New creates a new task for the "github.com/golangci/golangci-lint/cmd/golangci-lint" Go module command. If no extra arguments are configured, DefaultArgs are passed to the command.
func (*Task) ID ¶
func (t *Task) ID() *project.GoModuleID
ID returns the identifier of the Go module.