No description
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
2018-09-02 14:51:09 +03:00
check git grep -l golang.org/x/tools/go/callgraph | xargs sed -i '' 's/golang.org\/x\/tools\/go\/callgraph/github.com\/golangci\/tools\/go\/callgraph/g' 2018-09-02 14:25:48 +03:00
.travis.yml all: convert to a Go module 2018-08-26 18:34:06 -06:00
go.mod rename in go.mod 2018-09-02 14:51:09 +03:00
go.sum all: convert to a Go module 2018-08-26 18:34:06 -06:00
LICENSE First commit 2017-03-04 01:08:03 +01:00
main.go all: convert to a Go module 2018-08-26 18:34:06 -06:00
README.md README: update with the recent changes 2017-11-22 13:29:12 +00:00

unparam

Build Status

go get -u mvdan.cc/unparam

Reports unused function parameters and results in your code.

To minimise false positives, it ignores certain cases such as:

  • Exported functions (by default, see -exported)
  • Unnamed and underscore parameters
  • Funcs that may satisfy an interface
  • Funcs that may satisfy a function signature
  • Funcs that are stubs (empty, only error, immediately return, etc)
  • Funcs that have multiple implementations via build tags

It also reports results that always return the same value, parameters that always receive the same value, and results that are never used. In the last two cases, a minimum number of calls is required to ensure that the warnings are useful.

False positives can still occur by design. The aim of the tool is to be as precise as possible - if you find any mistakes, file a bug.