利用CCCC和CppCheck对C++代码进行检查并和Hudson集成

本文介绍了如何利用CCCC和CppCheck工具对C++源代码进行静态分析,包括内存泄漏、缓冲区溢出等错误,并详细阐述了下载、安装过程。同时,展示了在Hudson中通过执行Shell命令来运行这些工具,并配置Hudson的Post-build Actions以发布CCCC和Cppcheck的分析报告。
摘要由CSDN通过智能技术生成

CCCC - a code counter for C and C++

A program to analyse C and C++ source code and report on some simple software metrics.

CCCC which stands for C and C++ Code Counter is a source code analysis tool for C and C++. It calculates metrics for the code, outputs data in a handy HTML format and even colours dangerous functions.

CCCC can be downloaded for free from http://cccc.sourceforge.net/.

Download and Install

Download from the SourceForge site (I got cccc-3.1.4.tar.gz) and extract the files. Change to the newly created directory (in my case cccc-3.1.4) and run

[root@Server cccc-3.1.4]# ./build_posixgcc.sh

[root@Server cccc-3.1.4]# make install

In the cccc directory there should be a cccc executable which can be copied to a directory in your $PATH. Generally the cccc executable is copied to /usr/local/bin/ as default.

 

评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值