1
0
mirror of https://github.com/prometheus-community/postgres_exporter.git synced 2025-08-08 04:42:07 +03:00
Files
2017-06-07 00:53:19 +10:00

815 B

unparam

Build Status

go get -u github.com/mvdan/unparam

Reports unused function parameters in your code.

To minimise false positives, it ignores:

  • Unnamed and underscore parameters
  • Funcs whose signature matches a reachable func type
  • Funcs whose signature matches a reachable interface method
  • Funcs that have empty bodies
  • Funcs that will almost immediately panic or return constants

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

Note that "reachable" means func signatures found in top-level declarations in each package and all of its direct dependencies. The tool ignores transitive dependencies and local signatures.