C Language Code checking tool

Source: Internet
Author: User
Tags save file

Overview

Pc-lint is a long history, powerful static code detection tool. The history of its use dates back to the ancient times of computer programming (more than 30 years ago). After so many years of development, it can not only monitor a lot of grammatical logic of the hidden dangers, but also can effectively help you put many programs in space utilization, operational efficiency improvement points, in many professional-level software companies, such as Microsoft, Pc-lint Check no error no warning is the first pass to the code first, I personally think, for small companies and personal development, Pc-lint is also very important, because based on the development cost considerations, small companies and individuals often can not come up with a lot of very comprehensive testing, this time, The strong function of Pc-lint can improve the quality of the software very well.

Function

1 Pc-lint is a static code detection tool, it can be said that Pc-lint is a more stringent compiler, not only like the normal compiler to check out the general syntax errors, but also to check out those although fully grammatical requirements, but is likely to be a potential, not easily discovered errors.

2) Pc-lint can not only detect a single file, you can also detect problems from the perspective of the entire project, because the C language compiler inherent in a single compilation, these problems in the compiler environment is difficult to detect, and Pc-lint check the current file while checking all the relevant files, imagine, It will be of great help to us.

3) Pc-lint supports almost all popular editing environments and compilers, such as Borland C + + from 1.x to 5.x versions, Borland C + + build, GCC, Vc,vc.net, watcom C + +, Source insight, Intel/C + +, and so on, also supports the 16/32/64 platform environment.

4) supports the various ways to improve efficiency and prevent errors described in Scott Meyes's masterpiece (Effective C++/more effective C + +).

Four-Step Quick Pc-lint Overview

Such a good tool, of course, is first picked up and used to say, here are four steps to ensure that you can immediately use the Pc-lint, of course, if you get started, you want to learn this tool in depth, you can find the relevant information on the Internet, another in my another series of "software development of seven kinds of weapons" is a story Pc-lint use, than this article to be more detailed, if interested, you can also see.

The first step: Installation & Setup

The installation is no different from the usual software.

After installation, run the CONFIG.exe in the Pc-lint installation directory, and the settings are briefly explained as follows:

A The first step is to give the Pc-lint installation path and the save file for the selection settings.

b The second step is to select the C + + compiler you are using: For example, Visual C + + 6.x.

c The third step, select the memory mode: such as the bit Flat model.

d The fourth step, select the library used: such as mfc,owl, etc., can be selected, developed under Windows General to select the Windows bit.

E The fifth Step, C + + programming has made important recommendations of the author, select an author, his proposed programming options will be open: such as Scott Meyers, not to choose.

f) Step sixth, the setting of the header file: can be added manually in the later steps.

Step Two: Consolidate Pc-lint to the selected compilation environment

When you have selected the compiler in the second step above, you can find a "env-selected editing Environment" in the Pc-lint directory. lnt file, for example, for the source insight is env-si.lnt, for VC6 is env-vc6.lnt.

Open this file and configure your compiler according to the description above, taking VC6 as an example:

• Select Menu Tools | Customize .....

• Select Tools tab

• Click on the dotted small box above the main dialog box New

• Input Name:pc-lint

• Enter Command:c:\lint\lint-nt.exe, assuming installation to this path

• Input arguments:c:\lint\std.lnt? (FilePath)? 7) Select (x) use Output Window

· Close

• Once completed, a pc-lint option is available under the Tools menu. The following is a tool configuration diagram:

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.