noresultvalues

package
v0.17.0-pre.1 Latest Latest
Warning

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

Go to latest
Published: Nov 12, 2024 License: BSD-3-Clause Imports: 9 Imported by: 0

Documentation

Overview

Package noresultvalues defines an Analyzer that applies suggested fixes to errors of the type "no result values expected".

Analyzer noresultvalues

noresultvalues: suggested fixes for unexpected return values

This checker provides suggested fixes for type errors of the type "no result values expected" or "too many return values". For example:

func z() { return nil }

will turn into

func z() { return }

Index

Constants

This section is empty.

Variables

View Source
var Analyzer = &analysis.Analyzer{
	Name:             "noresultvalues",
	Doc:              analysisinternal.MustExtractDoc(doc, "noresultvalues"),
	Requires:         []*analysis.Analyzer{inspect.Analyzer},
	Run:              run,
	RunDespiteErrors: true,
	URL:              "https://pkg.go.dev/golang.org/x/tools/gopls/internal/analysis/noresultvalues",
}

Functions

func FixesError

func FixesError(msg string) bool

Types

This section is empty.

Jump to

Keyboard shortcuts

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