go-checkstyle alternatives and similar packages
Based on the "Code Analysis" category.
Alternatively, view go-checkstyle 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. -
revive
🔥 ~6x faster, stricter, configurable, extensible, and beautiful drop-in replacement for golint -
go-cleanarch
Clean architecture validator for go, like a The Dependency Rule and interaction between packages in your Go projects. -
goreturns
A gofmt/goimports-like tool for Go programmers that fills in Go return statements with zero values to match the func return types -
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 -
testifylint
The Golang linter that checks usage of github.com/stretchr/testify. -
go-outdated
Console application that displays outdated packages. -
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#. -
unused
unused checks Go code for unused constants, variables, functions and types. -
Golint online
Lints online Go source files on GitHub, Bitbucket and Google Project Hosting using the golint package. -
blanket
blanket is a tool that helps you catch functions which don't have direct unit tests in your Go packages.
WorkOS - The modern identity platform for B2B SaaS
Do you think we are missing an alternative of go-checkstyle or a related project?
README
go-checkstyle
checkstyle is a style check tool like java checkstyle. This tool inspired by java checkstyle, golint. The style refered to some points in Go Code Review Comments.
Install
go get github.com/qiniu/checkstyle/gocheckstyle
Run
gocheckstyle -config=.go_style dir1 dir2
Config
config is json file like the following:
{
"file_line": 500,
"func_line": 50,
"params_num":4,
"results_num":3,
"formated": true,
"pkg_name": true,
"camel_name":true,
"ignore":[
"a/*",
"b/*/c/*.go"
],
"fatal":[
"formated"
]
}
Add to makefile
check_go_style:
bash -c "mkdir -p checkstyle; cd checkstyle && export GOPATH=`pwd` && go get github.com/qiniu/checkstyle/gocheckstyle"
checkstyle/bin/gocheckstyle -config=.go_style dir1 dir2
Integrate with jenkins checkstyle plugin
excute in shell
mkdir -p checkstyle; cd checkstyle && export GOPATH=`pwd` && go get github.com/qiniu/checkstyle/gocheckstyle"
checkstyle/bin/gocheckstyle -reporter=xml -config=.go_style dir1 dir2 2>gostyle.xml
then add postbuild checkstyle file gostyle.xml
Run checkstyle with one or more filenames or directories. The output of this tool is a list of suggestions. If you need to force obey the rule, place it in fatal.
Checkstyle's difference with other tools
Checkstyle differs from gofmt. Gofmt reformats Go source code, whereas checkstyle prints out coding style suggestion.
Checkstyle differs from golint. Checkstyle check file line/function line/param number, could be configed by user.