unparam

Find unused function parameters and results in Go code

Github星跟踪图

unparam

go get 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.

主要指标

概览
名称与所有者mvdan/unparam
主编程语言Go
编程语言Go (语言数: 1)
平台
许可证BSD 3-Clause "New" or "Revised" License
所有者活动
创建于2017-03-04 12:22:48
推送于2025-03-01 12:50:50
最后一次提交2025-02-28 18:10:03
发布数0
用户参与
星数552
关注者数10
派生数29
提交数237
已启用问题?
问题数61
打开的问题数10
拉请求数18
打开的拉请求数0
关闭的拉请求数7
项目设置
已启用Wiki?
已存档?
是复刻?
已锁定?
是镜像?
是私有?