This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

有人在CCS下使用过pc-lint吗?



请问有专家在CCS3.3或其他版本下使用过PC-lint工具吗?这是一种常见的C/C++静态代码检查工具,最近我在调研该功能,不知道如何在CCS下面配置PC-LINT以进行单个文件或整个工程的检查?

网上可以查到很多关于在VC6.0、source insight等软件下配置pc-lint的方法,但是对于CCS尚无任何头绪,

请有过经验的人给予指点,谢谢!

  • 您好,

    没有用过,但是直接在source insight中进行pc-lint不就行了,为何还要在CCS下进行呢?

  • To use LintProject Professional you need to specify the following:

     

    • The project pathname (which you have done)
    • The path of the output folder to which analysis results generated by the tool should be written
    • The location of the PC-lint installation folder
    • The filename of the PC-lint configuration file (e.g. sd.lnt) to use
    • The configuration to analyse

     

    A typical command LintProject Professional line looks something like:

     

    LintProjectPro project.pjt resultsfolder /cfg="<config>" /folder="c:\lint" /configfile=”std.lnt" /show

     

    where <config> is the name of a configuration within the specified project, and assuming that PC-Lint is installed in the folder c:\lint.

     

    Available configurations can be determined using the command

     

    LintProjectPro project.pjt /cfg?

     

    There is a 3rd party that offers an integration:

    http://e2e.ti.com/support/development_tools/code_composer_studio/f/81/p/3571/12780.aspx#12780

    Note that for now LintProjectPro will inject env-vc7.lnt onto the command line; this is purely for message formatting purposes, and does not affect the analysis results. You should however ensure that std.lnt includes your system include paths, and that env-vc7.lnt has been copied from its default location in the PC-lint installation (the lnt) to the parent folder (the one containing the lint-nt.exe executable).

     

    Note also that Gimpel do not currently provide a co-xxxx.lnt compiler options file for CC3 (see http://www.gimpel.com/html/ptch90.htm); if you do not have something in place already we would be happy to work with yourselves and Gimpel to develop a suitable implementation.

  • CCS使用gmake,原则上应该能够把pclint嵌入到工程中。

    如果简单点,可以考虑使用CCS自带的MISRA。在工程选项中使能misra开关,做静态分析检查。具体misra的功能可以搜索一下相关网站