Configuration of the Pclint in VS2013

Source: Internet
Author: User

1, installation Pclint

A. Download the cracked version of the pclint9i version from http://download.csdn.net/detail/finewind/8426979;

B. Click Pclint9setuo.exe to install the Pclint to C:\lint (or another location);

C. Copy the content under the patch to C:\lint, 32-bit system performs the patch.bat,64-bit system execution patch64.bat;

D. After you finish executing the bat in C, you can delete the files copied from C.


2. Configure individual file check items

A. Create a new check folder under C:\lint;

B. Create a new file named Include.lnt under C:\lint\check and enter the following:

[CPP]View Plaincopy
    1. -ic:/lint
    2. -ic:/lint/lnt
    3. -ic:/"program Files"/"Microsoft Visual Studio 12.0"/vc/include
    4. -ic:/"program Files"/"Microsoft Visual Studio 12.0"/vc/atlmfc/include
    5. -ic:/"program Files"/"Microsoft Visual Studio 12.0"/vc/include

(This file contains the file path, the path of the remaining LNT file and the path of the system header file, can be added and modified according to the actual)

C. Create a new file named Std.lnt under C:\lint\check and enter the following:

[CPP]View Plaincopy
    1. -ic:\lint\lnt
    2. C:\lint\lnt\lib-w32.lnt
    3. C:\lint\lnt\co-msc90.lnt
    4. C:\lint\lnt\env-vc9.lnt
    5. -si4-sp4

(This file contains the basic LNT files required by vs2013 and some standard options, which can be added and modified according to the actual)

D. Create a new file named Option.lnt under C:\lint\check and enter the following:

[CPP]View Plaincopy
    1. -wlib (0)
    2. -e714 //function not use
    3. -e715
    4. -e522
    5. -e534
    6. -e830

(This file contains special options related to the project and can be modified according to the specific project)

E. Create a new File_chk.bat file under C:\lint\check and enter the following:

[CPP]View Plaincopy
    1. C:\lint\lint-nt.exe-ic:\lint\check include.lnt std.lnt option.lnt%1%2%3%4%5%6%7%8%9

F. Open VS2013, click Tools--External tools, click the Add button in the popup dialog box, and enter the following in each input box:

Title: Pclint File CHK

Command: C:\lint\check\file_chk.bat

Parameter: "$ (itemdir) $ (itemfilename) $ (itemext)"

Initial directory: $ (ITEMDIR)

Select the tick before using the Output window, then click Confirm to finish.

After that, a menu named Pclint file Chk will appear in the tool drop-down menu, and the current file can be pclint checked by clicking this bar.


3. Configure the entire project check

Note that 3 relies on several LNT files created by 2, so you need to complete 2 first.

A. Create a new file named Proj.bat under C:\lint\check and enter the following:

[CPP]View Plaincopy
    1. Echo >.\_file.lnt
    2. C:\lint\lint-nt.exe +linebuf%1 >. \_file.lnt
    3. C:\lint\lint-nt.exe-ic:\lint\check include.lnt std.lnt option.lnt. \_file.lnt
    4. del/f/Q. \_file.lnt

B. Open VS2013, click Tools--External tools, click the Add button in the popup dialog box, and enter the following in each input box:

Title: Pclint Prj CHK

Command: C:\lint\check\proj.bat

Parameters: $ (ProjectDir) $ (projectfilename)

Initial directory: $ (ProjectDir)

Select the tick before using the Output window, then click Confirm to finish.

After that, a menu named Pclint Prj chk will appear in the tool drop-down menu, and the current project can be pclint checked by clicking on this bar.

Note: You need to complete the INCLUDE.LNT header file according to the actual project, otherwise you may be unable to find the head file and error.

references:http://blog.csdn.net/zhangcunli/article/details/6842518


Configuration of the Pclint in VS2013

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.