unusedparams

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: 9 Imported by: 0

Documentation

Overview

Package unusedparams defines an analyzer that checks for unused parameters of functions.

Analyzer unusedparams

unusedparams: check for unused parameters of functions

The unusedparams analyzer checks functions to see if there are any parameters that are not being used.

To reduce false positives it ignores: - methods - parameters that do not have a name or have the name '_' (the blank identifier) - functions in test files - functions with empty bodies or those with just a return stmt

Index

Constants

This section is empty.

Variables

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

Functions

This section is empty.

Types

This section is empty.

Directories

Path Synopsis
The stringintconv command runs the stringintconv analyzer.
The stringintconv command runs the stringintconv analyzer.

Jump to

Keyboard shortcuts

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