sourcesight 与 pc_lint集成方法

来源:互联网 发布:淘宝几块钱的东西包邮 编辑:程序博客网 时间:2024/06/06 17:19

sourcesight 与 pc_lint集成方法


 

1、打开你的Source Insight, 选择Options-->Custom Commands-->Add, 随便输入一个名字(如:对单文件检查命令可以为:PCLint,对全工程进行检查可以为:PCLint_Project).

2、在Run中输入命令:

 a、在Source Insight 中 对单文件检查时,在Run中输入:
 X\pclint\lint-nt -u X\pclint\std.lnt X\pclint\env-si.lnt %f

 b、在Source Insight 中 对整个工程检查时,在Run中输入:
 X\unix\usr\local\wbin\find.exe %d -name *.c -o -name *.cpp | X\unix\usr\local\wbin\xargs.exe X\pclint\lint-nt -i"X\unix\usr\local" -u X\pclint\std.lnt X\pclint\env-si.lnt

3、Dir留空

4、下面的 
 Output选项中,Iconic Window, Capture Output 打勾;
 Control选项不变
 Source Links in Output选项中, Parse Links in OutPut, File,then Line 打勾。

5、点右侧 Menu--->Menu-->View--><end of menu>, 右侧Insert, OK.

6、此时在SourceInsight中的View菜单下多了个 PCLint(或PCLint_Project,就是你之前取的名字)选项,可以用它来对一个工程中的C/C++文件进行静态检查。

0 0