codecheck_use_record
文章目录
- Step 1: Integrate CodeChecker into your build system
- Step 2: Analyze your code
- Step 3: Run the analysis
- Step 4: View the analysis results in the command line
- Step 5: Hint: You can do the 1st and the 2nd step in one round by executing `check`
- step 6: Export the reports as static HTML files
Step 1: Integrate CodeChecker into your build system
source ~/codechecker/venv/bin/activate
(CodeChecker venv) guoqiang@sun:~/depth_magic_ws/deptrum/build$ make clean
(CodeChecker venv) guoqiang@sun:~/depth_magic_ws/deptrum/build$ codechecker log --build "make depth_magic" --output ./compile_commands.json
(CodeChecker venv) guoqiang@sun:~/depth_magic_ws/deptrum/build$ codechecker log --build "make depth_magic" --output ./compile_commands.json
Step 2: Analyze your code
Once the build is logged successfully and the compile_commands.json
was created, you can analyze your project.
Step 3: Run the analysis
CodeChecker analyze ./compile_commands.json --enable sensitive --output ./reports
commond line
(CodeChecker venv) guoqiang@sun:~/depth_magic_ws/deptrum/build$ codechecker analyze ./compile_commands.json --enable sensitive --output ./reports
(CodeChecker venv) guoqiang@sun:~/depth_magic_ws/deptrum/build$ codechecker analyze ./compile_commands.json --enable sensitive --output ./reports
cause reports files
The ./reports
directory is the “database” of CodeChecker that allows to manage further working steps.
Step 4: View the analysis results in the command line
(CodeChecker venv) guoqiang@sun:~/depth_magic_ws/deptrum/build$ codechecker parse ./reports/
Step 5: Hint: You can do the 1st and the 2nd step in one round by executing check
cd <repo root dir>/docs/examples
make clean
CodeChecker check --build "make" --output ./reports --clean \--enable sensitive
or to run on 22 threads both the compilation and the analysis:
CodeChecker check --jobs 22 --build "make clean ; make --jobs 22" \--output ./reports --clean --enable sensitive
step 6: Export the reports as static HTML files
You can visualize the results as static HTML by executing
(CodeChecker venv) guoqiang@sun:~/depth_magic_ws/deptrum/build$ codechecker parse -e html ./reports/ -o ./reports_html
result show:
google-build-using-namespace | STYLE | 54
google-explicit-constructor | MEDIUM | 1134
google-global-names-in-headers | STYLE | 3
google-runtime-int | LOW | 695
google-runtime-references | STYLE | 2006
misc-forwarding-reference-overload | LOW | 8
misc-incorrect-roundings | HIGH | 58
misc-macro-parentheses | MEDIUM | 384
misc-misplaced-const | LOW | 9
misc-misplaced-widening-cast | HIGH | 7
misc-redundant-expression | MEDIUM | 19
misc-sizeof-container | HIGH | 3
misc-sizeof-expression | HIGH | 5
misc-suspicious-enum-usage | HIGH | 4
misc-unconventional-assign-operator | MEDIUM | 174
misc-unused-using-decls | LOW | 1
modernize-deprecated-headers | LOW | 106
modernize-replace-auto-ptr | LOW | 1
optin.cplusplus.VirtualCall | MEDIUM | 1
performance-faster-string-find | LOW | 5
performance-inefficient-string-concatenation | LOW | 1
performance-inefficient-vector-operation | LOW | 2
performance-move-const-arg | MEDIUM | 5
performance-move-constructor-init | MEDIUM | 1
performance-noexcept-move-constructor | MEDIUM | 44
performance-type-promotion-in-math-fn | LOW | 1
performance-unnecessary-copy-initialization | LOW | 4
performance-unnecessary-value-param | LOW | 113
security.FloatLoopCounter | MEDIUM | 8
unix.API | MEDIUM | 1
unix.Malloc | MEDIUM | 1
----------------------------------------------------------------------------------==== Severity Statistics ====----
----------------------------
Severity | Number of reports
----------------------------
HIGH | 132
MEDIUM | 2068
LOW | 2332
STYLE | 2063
----------------------------To view statistics in a browser run:
> firefox ./reports_html/statistics.htmlTo view the results in a browser run:
> firefox ./reports_html/index.html
(CodeChecker venv) guoqiang@sun:~/depth_magic_ws/deptrum/build$
相关文章:

centos6.5 rsync+inotify同步配置笔记
以两台服务器为例: 主服务器: 192.168.1.100 从服务器: 192.168.1.101 1.安装rsync (主服务器与从服务器同时安装) 使用xinetd管理rsync yum install rsync xinetd 设置开机启动 vi /etc/xinetd.d/rsync ... 修改为 disable no ... 启动xin…

HOG 特征计算实现
// 获取HOG直方图 cv::Mat getHog(Point pt,std::vector<Mat> &integrals) {// 判断当前点的位置是否符合条件 if( pt.x - R < 0 ||pt.y - R < 0 ||pt.x R > integrals[0].cols ||pt.y R > integrals[0].rows ){return Mat();}// 直方图Mat hist(Size(…

Spring+SpringMVC+Mybatis整合
一、简单测试工程搭建1、Mybatis所需要的的jar包(包含数据库驱动包和相关的日志包)、SpringMVC和Spring的jar包2、然后构建一个基本的工程,这里我们使用mapper代理的方式进行Mybatis的编写,关于mapper代理请参考Mybatis简单入门中…

【Tools】Markdown数学符号公式(史上最全公式表)
Markdown数学符号&公式 文章目录Markdown数学符号&公式1. 希腊字母表2. 希腊字母3. 数学符号表4. 数学符号5. 数学符号补充表6. 数学符号补充1. 希腊字母表 符号代码符号代码α\alphaα\alphaA\AlphaA\Alphaβ\betaβ\betaB\BetaB\Betaγ\gammaγ\gammaΓ\GammaΓ\gam…

Editplus下载、安装并最佳配色方案(强烈推荐)
不多说,直接上干货! Editplus下载 第一步:进入官网 https://www.editplus.com/ 第二步:下载 https://www.editplus.com/download.html Editplus安装 我这里,直接以一个压缩包来安装,需要的,请…

MySQL数据库开发规范-EC
最近一段时间一边在线上抓取SQL来优化,一边在整理这个开发规范,尽量减少新的问题SQL进入生产库。今天也是对公司的开发做了一次培训,PPT就不放上来了,里面有十来个生产SQL的案例。因为规范大部分还是具有通用性,所以也…

操作系统与内存管理
操作系统内存管理 文章目录操作系统内存管理1. 虚拟地址空间2. 内存地址空间含义及分配3. 虚拟内存诞生的前世与今生?3.1 内存管理的好处3.2 **内存管理实现总体策略**4. 不同进程如何划分内存地址空间?5 内存分配与回收5.1 buffer和cache5.2 malloc背后…

圆形 LBP 特征
template <typename _Tp> staticinline void elbp_(InputArray _src, OutputArray _dst,int radius, int neighbors) {// 得到数据矩阵Mat src _src.getMat();// 输出矩阵_dst.create(src.rows-2*radius, src.cols-2*radius, CV_32SC1);Mat dst _dst.getMat();// 初始化…

40个Java多线程问题总结
(转) 这篇文章作者写的真是不错 40个问题汇总 1、多线程有什么用? 一个可能在很多人看来很扯淡的一个问题:我会用多线程就好了,还管它有什么用?在我看来,这个回答更扯淡。所谓"知其然知其所…

SLAM十四讲笔记1
文章目录ch02 初识SLAMch02-01 经典视觉SLAM框架ch02-02 SLAM问题的数学表述ch03 三维空间刚体运动ch03.01 旋转矩阵:点和向量,坐标系01 向量a在线性空间的基[e1,e2,e3][e_1,e_2,e_3][e1,e2,e3]下的坐标为[a1,a2,a3]T[a_1,a_2,a_3]^T[a1,a2,a3]T.02 向量…

12、OpenCV实现图像的空间滤波——图像平滑
1、空间滤波基础概念 1、空间滤波基础 空间滤波一词中滤波取自数字信号处理,指接受或拒绝一定的频率成分,但是空间滤波学习内容实际上和通过傅里叶变换实现的频域的滤波是等效的,故而也称为滤波。空间滤波主要直接基于领域(空间域…

计算 LBP 特征
#include <opencv2/opencv.hpp> #include <opencv2/highgui/highgui.hpp> #include <opencv2/features2d/features2d.hpp> #include <opencv2/features2d/features2d.hpp> // 计算原始LBP特征 cv::Mat OLBP(cv::Mat& srcImage) {const int nRows …

三维重建【四】-------------------结构光 三维重建----论文调研
1. 动态目标实时三维重建-结构光方案 动态目标 三维重建 Stripe boundary codes for real-time structured-light range scanning of moving objects 我们提出了一种新的实时结构光扫描方法。在分析现有结构光技术的基本假设之后,我们基于编码投影条纹之间的边界&…

APP开发定制
app是什么意思? APP,application的简称,是智能手机的第三方应用程序,常见的有微信、手机qq、今日头条、手机支付宝、腾讯视频、微店等,随着智能手机和ipad等移动终端设备的普及,人们逐渐习惯了使用APP客户端上网的方式…

Haar 特征提取
double HaarExtract(double const ** image ,int type_, cv::Rect roi) {double value;double wh1, wh2;double bk1, bk2;int x roi.x;int y roi.y;int width roi.width;int height roi.height;switch (type_){// Haar水平边缘case 0: // HaarHEdgewh1 calcIntegral(image…

awk的基本⽤法
awk的基本⽤法 awk是报告⽣成器,格式化⽂本输出,有多种版本。centos中的是gawk即GNU awk版本。 awk⼯作原理:第⼀步:执⾏BEGIN{action;...}语句块中的语句。第⼆步:从⽂件或标准输⼊(stdin)读取…
视音频数据处理入门:RGB、YUV像素数据处理【转】
转自:http://blog.csdn.net/leixiaohua1020/article/details/50534150 视音频数据处理入门系列文章: 视音频数据处理入门:RGB、YUV像素数据处理 视音频数据处理入门:PCM音频采样数据处理 视音频数据处理入门:H.264视频…

SVO(SVO: fast semi-direct monocular visual odometry)
SVO(SVO: fast semi-direct monocular visual odometry)翻译 文章目录SVO(SVO: fast semi-direct monocular visual odometry)翻译1、介绍2、系统概述3、符号4、运动估计4.1、 基于稀疏模型的图像对齐4.2、 通过特征对齐松弛4.3、…

MSER 候选车牌区域检测
#include "opencv2/highgui/highgui.hpp" #include "opencv2/features2d/features2d.hpp" #include "opencv2/imgproc/imgproc.hpp" #include <iostream> // Mser车牌目标检测 std::vector<cv::Rect> mserGetPlate(cv::Mat srcImage…

从HelloWorld看Knative Serving代码实现
为什么80%的码农都做不了架构师?>>> 摘要: Knative Serving以Kubernetes和Istio为基础,支持无服务器应用程序和函数的部署并提供服务。我们从部署一个HelloWorld示例入手来分析Knative Serving的代码细节。 概念先知 官方给出的这…

svo_note
SVO论文笔记1.frame overviews2. Motion Estimate Thread2.1 Sparse Model-based Image Alignment 基于稀疏点亮度的位姿预估2.2 Relaxation Through Feature Alignment 基于图块的特征点匹配2.3 Pose and Structure Refinement3 Mapping Thread3.1 depth-filter3.2 初始化参考…

Druid 配置 wallfilter
这个文档提供基于Spring的各种配置方式 使用缺省配置的WallFilter <bean id"dataSource" class"com.alibaba.druid.pool.DruidDataSource" init-method"init" destroy-method"close">...<property name"filters" v…

vue下的bootstrap table + jquery treegrid, treegrid无法渲染的问题
在mian.js导入的包如下:该bootstrap-table-treegrid.js需要去下载,在复制到jquery-treegrid/js/ 1 import $ from jquery 2 import bootstrap/dist/css/bootstrap.min.css 3 import bootstrap/dist/js/bootstrap.min 4 import bootstrap-table/dist/boot…

内存和缓存的区别
今天看书的时候又看到了内存和缓存,之所以说又,是因为之前遇到过查过资料,但是现在又忘了(图侵删)。 所以又复习一遍,记录一下,有所纰漏的地方,欢迎指正。 同志们,上图并不是内存和缓存中的任何…

【Boost】noncopyable:不可拷贝
【CSDN】:boost::noncopyable解析 【Effective C】:条款06_若不想使用编译器自动生成地函数,就该明确拒绝 1.example boost::noncopyable 为什么要boost::noncopyable 在c中定义一个类的时候,如果不明确定义拷贝构造函数和拷贝赋…

BigData NoSQL —— ApsaraDB HBase数据存储与分析平台概览
一、引言时间到了2019年,数据库也发展到了一个新的拐点,有三个明显的趋势: 越来越多的数据库会做云原生(CloudNative),会不断利用新的硬件及云本身的优势打造CloudNative数据库,国内以阿里云的Cloud HBase、POLARDB为代…

ubuntu clion 创建桌面快捷方式
ubuntu clion 创建桌面快捷方式 首先在终端下输入 cd /usr/share/applications/进入applications目录下,建立一个clion.desktop文件 sudo touch clion.desktop然后在vim命令下编辑该文件 sudo vim clion.desktop进入vim后,按i插入开始编辑该文件&…

Flex 布局:语法篇
2019独角兽企业重金招聘Python工程师标准>>> 布局的传统解决方案,基于盒状模型,依赖 display 属性 position 属性 float 属性。它对于那些特殊布局非常不方便,比如,垂直居中就不容易实现。 2009年,W3C 提…

特征运动点估计
cv::Mat getRansacMat(const std::vector<cv::DMatch>& matches, const std::vector<cv::KeyPoint>& keypoints1, const std::vector<cv::KeyPoint>& keypoints2, std::vector<cv::DMatch>& outMatches) {// 转换特征点格式std::vecto…

Vue+Element-ui+二级联动封装组件
通过父子组件传值 父组件: 1 <template>2 <linkage :citysList"citysList" :holder"holder" saveId"saveId"></linkage>3 </template>4 <script>5 import linkage from ./common/linkage6 export de…