unconvert alternatives and similar packages
Based on the "Code Analysis" category.
Alternatively, view unconvert 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. -
goreturns
A gofmt/goimports-like tool for Go programmers that fills in Go return statements with zero values to match the func return types -
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. -
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#. -
gosimple
gosimple is a linter for Go source code that specialises on simplifying code. -
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 unconvert or a related project?
README
About
The unconvert program analyzes Go packages to identify unnecessary type conversions; i.e., expressions T(x) where x already has type T.
Install
go install github.com/mdempsky/[email protected]
Usage
$ unconvert -v bytes fmt
GOROOT/src/bytes/reader.go:117:14: unnecessary conversion
abs = int64(r.i) + offset
^
GOROOT/src/fmt/print.go:411:21: unnecessary conversion
p.fmt.integer(int64(v), 16, unsigned, udigits)
^
Flags
Using the -v flag, unconvert will also print the source line and a caret to indicate the unnecessary conversion's position therein.
Using the -apply flag, unconvert will rewrite the Go source files without the unnecessary type conversions.
Using the -all flag, unconvert will analyze the Go packages under all possible GOOS/GOARCH combinations, and only identify conversions that are unnecessary in all cases.
E.g., syscall.Timespec's Sec and Nsec fields are int64 under linux/amd64 but int32 under linux/386. An int64(ts.Sec) conversion that appears in a linux/amd64-only file will be identified as unnecessary, but it will be preserved if it occurs in a file that's compiled for both linux/amd64 and linux/386.