A Golang tool that does static analysis, unit testing, code review and generate code quality report. This is a tool that concurrently runs a whole bunch of those linters and normalizes their output to a report:
- Supported linters
- Supported template
- Todo List
- Installing
- Run it
- Quickstart
- Example
- Report-example
- Credits
- unittest - Golang unit test status.
- deadcode - Finds unused code.
- gocyclo - Computes the cyclomatic complexity of functions.
- varcheck - Find unused global variables and constants.
- structcheck - Find unused struct fields.
- aligncheck - Warn about un-optimally aligned structures.
- errcheck - Check that error return values are used.
- copycode(dupl) - Reports potentially duplicated code.
- gosimple - Report simplifications in code.
- staticcheck - Statically detect bugs, both obvious and subtle ones.
- godepgraph - Godepgraph is a program for generating a dependency graph of Go packages.
- misspell - Correct commonly misspelled English words... quickly.
- countcode - Count lines and files of project.
- html template file which can be loaded via
-t <file>
.
- There are still many shortcomings in the presentation of the report, showing that the model is not perfect, and hope that someone can help optimize it.
- Bad Practice:the code violates the accepted best practice standards
- Malicious code vulnerbility
- Performance
- Security
Install goreporter (see above).
$ go get -u github.com/wgliang/goreporter
$ goreporter -p [projectRelativePath] -r [reportPath] -e [exceptPackagesName] -f [json/html/text] {-t templatePathIfHtml}
- -p Must be a valid Golang project path.
- -r Save the path to the report.
- -e Exceptional packages (multiple separated by commas, for example: "linters/aligncheck,linters/cyclo" ).
- -f report format json, html OR text.
- -t Template path,if not specified, the default template will be used.
By default, the default template is used to generate reports in html format.
$ goreporter -p ../goreporter -r ../goreporter -t ./templates/template.html
you can see result detail:online-example-report
example:github.com/wgliang/logcool
Logo is designed by Ri Xu