infertypeargs

package
v0.15.0-pre.1 Latest Latest
Warning

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

Go to latest
Published: Jan 5, 2024 License: BSD-3-Clause Imports: 8 Imported by: 0

Documentation

Overview

Package infertypeargs defines an analyzer that checks for explicit function arguments that could be inferred.

Index

Constants

View Source
const Doc = `` /* 284-byte string literal not displayed */

Variables

View Source
var Analyzer = &analysis.Analyzer{
	Name:     "infertypeargs",
	Doc:      Doc,
	Requires: []*analysis.Analyzer{inspect.Analyzer},
	Run:      run,
	URL:      "https://pkg.go.dev/golang.org/x/tools/gopls/internal/analysis/infertypeargs",
}

Functions

func DiagnoseInferableTypeArgs

func DiagnoseInferableTypeArgs(fset *token.FileSet, inspect *inspector.Inspector, start, end token.Pos, pkg *types.Package, info *types.Info) []analysis.Diagnostic

DiagnoseInferableTypeArgs reports diagnostics describing simplifications to type arguments overlapping with the provided start and end position.

If start or end is token.NoPos, the corresponding bound is not checked (i.e. if both start and end are NoPos, all call expressions are considered).

Types

This section is empty.

Jump to

Keyboard shortcuts

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