A Go static analysis tool that identifies naked returns in functions exceeding a specified line length.
nakedret is a Go static analysis tool that finds naked returns in functions longer than a specified line length. It helps developers identify implicit return statements that violate Go's code review guidelines, which recommend explicit returns for medium-sized functions to improve code clarity.
Go developers and teams who want to enforce consistent code style and follow Go's official code review recommendations, particularly those working on larger codebases where maintainability is crucial.
Developers choose nakedret because it provides a simple, focused way to automate compliance with Go's naked return guidelines, integrates seamlessly with existing Go tooling like go vet, and offers configurable thresholds to match team preferences.
nakedret is a Go static analysis tool to find naked returns in functions greater than a specified function length.
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Targets only naked returns, making it lightweight and easy to integrate without overwhelming developers with unnecessary checks.
The -l flag allows setting maximum function length, enabling teams to adjust based on their specific code review standards and preferences.
Can be run as a go vet plugin, fitting naturally into existing Go development workflows and CI/CD pipelines without extra overhead.
Based on Go's code review comments, ensuring adherence to community-recommended best practices for code clarity and maintainability.
Only checks for naked returns, lacking broader static analysis features like import aliases or preallocation found in other tools, which may require additional linters.
The README's TODO list admits gaps such as unit tests, configuration for test files, and Vim quickfix format, indicating incomplete development and potential usability issues.
No built-in IDE or editor support; requires manual installation, PATH configuration, and integration into workflows, which can be a barrier for some teams.