PCLint培训手册.doc

  1. 1、本文档共139页,可阅读全部内容。
  2. 2、原创力文档(book118)网站文档一经付费(服务费),不意味着购买了该文档的版权,仅供个人/单位学习、研究之用,不得用于商业用途,未经授权,严禁复制、发行、汇编、翻译或者网络传播等,侵权必究。
  3. 3、本站所有内容均由合作方或网友上传,本站不对文档的完整性、权威性及其观点立场正确性做任何保证或承诺!文档内容仅供研究参考,付费前请自行鉴别。如您付费,意味着您自己接受本站规则且自行承担风险,本站不退款、不进行额外附加服务;查看《如何避免下载的几个坑》。如果您已付费下载过本站文档,您可以点击 这里二次下载
  4. 4、如文档侵犯商业秘密、侵犯著作权、侵犯人身权等,请点击“版权申诉”(推荐),也可以打举报电话:400-050-0827(电话支持时间:9:00-18:30)。
查看更多
PC-Lint简介 PC-Lint是C/C++软件代码静态分析工具,它对程序进行全局分析,识别并报告C语言中的编程陷阱和格式缺陷它不仅可以检查出一般的语法错误,还可以检查出那些虽然符合语法要求但不易发现的潜在错误。使用PC-Lint在代码走读和单元测试之前进行检查,可以提前发现程序隐藏错误,提高代码质量,节省测试时间/ 第三方工具: Visual Lint http://www.riverblade.co.uk/products/visual_lint/index.html LintProject http://www.riverblade.co.uk/products/lintproject/index.html 安装 安装后的目录 Lint 目录下的文件: lint-nt.exe PC-lint 执行程序 config.exe PC-lint 配置程序 readme.txt 帮助手册的补充信息 pc-lint.pdf 帮助手册 pr.exe 打印工具. msg.txt PC-lint 的错误提示消息列表,最终根据它来修改代码 unwise.exe 卸载程序 install.log 安装日志 _LINT.TMP 保存PC-lint 检查代码后输出的错误信息,可用”记事本”打开 Lnt\ ... 文件夹 co-....lnt 特定编译器的配置选项 co.lnt 通用编译器的配置选项 sl-....c 非ANSI 编译器的标准库模块 sl.c 非ANSI 编译器的通用标准库模块 env-....lnt 各种编辑环境如Microsoft's Visual Studio 的配置文件 lib-....lnt 特定库的配置文件 au-....lnt 作者推荐检查项的配置文件,指Scott Meyers 的Effective C++,More Effective C++,Misra,Dan Saks 的C++ Gotchas Test\... 测试代码目录 配置 CONFIG.exe 配置向导将创建一个lin.bat文件,可用于检查C/C++文件,使用方法: lin options file1 file2 … LSET.BAT文件可用于设置PATH lin.bat的内容: InstDir\lint-nt -iConfDir std.lnt &1 &2 ... 总体而言,配置向导将产生以下文件: LIN.BAT A batch file which can also be copied into your PATH and which contains a reference to STD.LNT. STD.LNT An indirect lint file that will "point to" a compiler options file and an options file and optionally other files and options. STD_...LNT A sequence of different versions of STD.LNT that the wizard can choose from later. OPTIONS.LNT A convenient centrally located options file that you will tend to use for most of your linting. LSET.BAT A batch file optionally generated to be used to place the PC-lint executable in your PATH. 配置向导还将从安装目录拷贝以下文件到配置目录: co-....lnt Compiler options file(s) env-....lnt Environment options files lib-....lnt Library options files lib-....h Headers referenced by lib-....lnt files. au-....lnt Options files for author recommended checks file?.cpp A pair of test programs described in the next section. 运行测试程序 lin filea fileb 将对filea和fileb进行代码检测: filea.cpp: //lint -w2 reduce the warning le

文档评论(0)

专业好文档 + 关注
实名认证
内容提供者

该用户很懒,什么也没介绍

版权声明书
用户编号:6110200002000000

1亿VIP精品文档

相关文档