Help us shape the future of Go! Take the 2026 Go Developer Survey

lintcli

package
v1.21.85 Latest Latest
Warning

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

Go to latest
Published: Oct 27, 2026 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Overview

Package lintcli implements the argument handling and output of the `clicky lint` command on top of the lint package.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BindFlags

func BindFlags(flags *pflag.FlagSet, opts *Options)

func HelpRequested

func HelpRequested(args []string) bool

func ParseSeverityOverrides

func ParseSeverityOverrides(values []string) (map[string]lint.Severity, error)

ParseSeverityOverrides reads the --severity flags into the map the runner takes. Rule IDs are validated by the runner against the real catalogue, so a typo surfaces there rather than being silently dropped here.

func RawArgs

func RawArgs(args []string) ([]string, bool)

RawArgs reports whether args select the raw go/analysis driver and, if so, returns the arguments to hand to it.

func Render

func Render(w io.Writer, result *lint.Result, opts Options) error

func Run

func Run(w io.Writer, args []string) error

Run parses the non-raw lint arguments, lints the packages and renders the result to w, returning ExitError when error-level diagnostics were found.

func RunRaw

func RunRaw(args []string) error

RunRaw hands args to the go/analysis singlechecker driver, which exits the process.

func SourceFlagPresent

func SourceFlagPresent(args []string) bool

Types

type ExitError

type ExitError struct {
	Result *lint.Result
}

func (ExitError) Error

func (e ExitError) Error() string

type Options

type Options struct {
	Format       string
	NoColor      bool
	Raw          bool
	SummaryLimit int
	Severity     []string
	Source       bool
	SourceLines  int
}

func DefaultOptions

func DefaultOptions() Options

func ParseArgs

func ParseArgs(args []string) (Options, []string, error)

Jump to

Keyboard shortcuts

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