Reports unused function parameters and results in Go code while minimizing false positives.
unparam is a static analysis tool for Go that finds unused function parameters and results in your code. It helps identify unnecessary parameters that clutter function signatures and can be safely removed to improve code clarity and maintainability.
Go developers and teams who want to maintain clean, efficient codebases by removing unused parameters and reducing function signature complexity.
Developers choose unparam because it provides precise detection of unused parameters while intelligently minimizing false positives through sophisticated analysis of interface implementations, exported functions, and edge cases.
Find unused parameters in Go
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Intelligently ignores exported functions, interface implementations, stub functions, and build tag variations, as stated in the README, reducing unnecessary noise in reports.
Identifies unused parameters, unused results, and constant value analysis, helping clean multiple aspects of function signatures based on the README's feature list.
Properly handles functions with multiple implementations via build tags, ensuring accurate analysis in complex Go projects, as mentioned in the Key Features.
Can be installed with a single command 'go install mvdan.cc/unparam@latest', making it accessible and straightforward for Go developers.
The README admits false positives can still occur by design, requiring manual verification and potentially leading to wasted effort in some edge cases.
Lacks built-in integration with CI/CD or IDEs, forcing developers to run it manually or script their own workflows for automated checks.
Cannot detect unused parameters in runtime scenarios or complex dynamic code paths, limiting its effectiveness in certain Go applications.