goreturns alternatives and similar packages
Based on the "Code Analysis" category.
Alternatively, view goreturns alternatives based on common mentions on social networks and blogs.
-
Go Metalinter
Metalinter is a tool to automatically apply all static analysis tool and report their output in normalized form. -
go-cleanarch
Clean architecture validator for go, like a The Dependency Rule and interaction between packages in your Go projects. -
go-mod-outdated
Find outdated dependencies of your Go projects. go-mod-outdated provides a table view of the go list -u -m -json all command which lists all dependencies of a Go project and their available minor and patch updates. It also provides a way to filter indirect dependencies and dependencies without updates. -
tickgit
Manage your repository's TODOs, tickets and checklists as config in your codebase. -
GoCover.io
GoCover.io offers the code coverage of any golang package as a service. -
gostatus
A command line tool that shows the status of Go repositories. -
apicompat
apicompat checks recent changes to a Go project for backwards incompatible changes -
ChainJacking
Find which of your direct GitHub dependencies is susceptible to RepoJacking attacks -
usestdlibvars
A linter that detect the possibility to use variables/constants from the Go standard library. -
tarp
tarp finds functions and methods without direct unit tests in Go source code. -
gosimple
gosimple is a linter for Go source code that specialises on simplifying code. -
staticcheck
staticcheck is go vet on steroids, applying a ton of static analysis checks you might be used to from tools like ReSharper for C#. -
Golint online
Lints online Go source files on GitHub, Bitbucket and Google Project Hosting using the golint package. -
unused
unused checks Go code for unused constants, variables, functions and types. -
blanket
blanket is a tool that helps you catch functions which don't have direct unit tests in your Go packages.
Static code analysis for 29 languages.
Do you think we are missing an alternative of goreturns or a related project?
README
This tool adds zero-value return values to incomplete Go return statements, to save you time when writing Go. It is inspired by and based on goimports.
[short screencast](screencast.gif)
full 30-second screencast: http://youtu.be/hyEMO9vtKZ8
For example, the following incomplete return statement:
func F() (*MyType, int, error) { return errors.New("foo") }
is made complete by adding nil and 0 returns (the zero values for *MyType and int):
func F() (*MyType, int, error) { return nil, 0, errors.New("foo") }
To install:
go get -u github.com/sqs/goreturns
To run:
goreturns file.go
To view a diff showing what it'd do on a sample file:
goreturns -d $GOPATH/github.com/sqs/goreturns/_sample/a.go
Editor integration: replace gofmt or goimports in your post-save hook with goreturns. By default goreturns calls goimports on files before performing its own processing.
It acts the same as gofmt (same flags, etc) but in addition to code formatting, also fixes returns.