goreporter 代码扫描

Goreporter是一款用于Golang项目的代码质量检查工具,支持包括gofmt、govet、golint、unittest等在内的多种特性,能够帮助开发者检测代码格式、变量覆盖、未使用代码、复杂度等问题,提升代码质量和维护效率。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

goreporter 代码扫描

  1. 支持的特性
gofmt - Checks if the code is properly formatted and could not be further simplified.
govet - Reports variables that may have been unintentionally shadowed.
golint - Golint is a linter for Go source code.
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.
interfacer - Suggest narrower interfaces that can be used.
depth - Count the maxdepth of go functions.
flen - Flen provides stats on functions/methods lengths in a Golang package.
2.用法
goreporter -p [projectRelativePath] -r [reportPath] -e [exceptPackagesName] -f [json/html/text]  {-t templatePathIfHtml}
3.使用示例
goreporter -p ./xxx -r ../
4.结果输入

http://wgliang.github.io/pages/goreporter-report.html

5.相关链接

https://github.com/360EntSecGroup-Skylar/goreporter

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值