gotools/go/analysis/internal/analysisflags/flags.go

var JSON

var Context

// Parse creates a flag for each of the analyzer's flags,
// including (in multi mode) a flag named after the analyzer,
// parses the flags, then filters and returns the list of
// analyzers enabled by flags.
//
// The result is intended to be passed to unitchecker.Run or checker.Run.
// Use in unitchecker.Run will gob.Register all fact types for the returned
// graph of analyzers but of course not the ones only reachable from
// dropped analyzers. To avoid inconsistency about which gob types are
// registered from run to run, Parse itself gob.Registers all the facts
// only reachable from dropped analyzers.
// This is not a particularly elegant API, but this is an internal package.
func Parse(analyzers []*analysis.Analyzer, multi bool) []*analysis.Analyzer {}

func expand(analyzers []*analysis.Analyzer) map[*analysis.Analyzer]bool {}

func printFlags() {}

// addVersionFlag registers a -V flag that, if set,
// prints the executable version and exits 0.
//
// If the -V flag already exists — for example, because it was already
// registered by a call to cmd/internal/objabi.AddVersionFlag — then
// addVersionFlag does nothing.
func addVersionFlag() {}

type versionFlag

func (versionFlag) IsBoolFlag() bool {}

func (versionFlag) Get() interface{}

func (versionFlag) String() string   {}

func (versionFlag) Set(s string) error {}

type triState

const unset

const setTrue

const setFalse

func triStateFlag(name string, value triState, usage string) *triState {}

// triState implements flag.Value, flag.Getter, and flag.boolFlag.
// They work like boolean flags: we can say vet -printf as well as vet -printf=true
func (ts *triState) Get() interface{}

func (ts triState) isTrue() bool {}

func (ts *triState) Set(value string) error {}

func (ts *triState) String() string {}

func (ts triState) IsBoolFlag() bool {}

var vetLegacyFlags

// PrintPlain prints a diagnostic in plain text form,
// with context specified by the -c flag.
func PrintPlain(fset *token.FileSet, diag analysis.Diagnostic) {}

type JSONTree

type JSONTextEdit

type JSONSuggestedFix

type JSONDiagnostic

type JSONRelatedInformation

// Add adds the result of analysis 'name' on package 'id'.
// The result is either a list of diagnostics or an error.
func (tree JSONTree) Add(fset *token.FileSet, id, name string, diags []analysis.Diagnostic, err error) {}

func (tree JSONTree) Print() {}