代码扫描工具
guoguangwu
这个作者很懒,什么都没留下…
展开
-
golang 代码扫描 staticcheck
staticcheck是一个go的静态代码扫描工具。如果想递归扫描目录下的代码,执行如下操作进入代码目录staticcheck ./...终端就会打印相应的代码提示信息:httptransport/client/httpclient.go:40:39: should use make([]driver.UpdateOperation, len(ops)) instead (S1019)httptransport/client/matcher.go:95:5: defers in th原创 2022-05-19 18:19:59 · 2705 阅读 · 0 评论 -
cppcheck 检查内存泄漏
#include<stdio.h>#include<string.h>#include<stdlib.h>int main(){ char ptr[10] = {}; memcpy(ptr, NULL, 0); void * ptr = malloc(sizeof(100)); return 0;}x03430-a@x03430-a:~/test/mem$ cppcheck mem_test.c Checking m..原创 2021-11-22 18:47:43 · 965 阅读 · 0 评论