Configuring for PC-lint analysis

In a typical installation, configuring Visual Lint to use PC-lint involves defining the contents of two configuration files - conventionally std.lnt and options.lnt. These files determine which compiler and library options will be used during analysis, and their contents are very important if the analysis is to be accurate and error-free. Although a full discussion of the options which these files may contain is beyond the scope of this guide, details can be found in the PC-lint manual.

If however you are setting up Visual Lint for use with PC-lint for the first time, you might find it useful to take a look at the PC-lint configuration files we use ourselves.

The following zipfile contains std.lnt files for various supported IDEs, as well as the options.lnt file which defines our own warning policy:

http://www.riverblade.co.uk/products/visual_lint/downloads/pclint_config_files.zip

 

Step 1: Run the Configuration Wizard

The Configuration Wizard can be invoked from the Configuration Wizard command on the Visual Lint toolbar. When run, it will guide you through the process of configuring Visual Lint for use with supported analysis tools:

Introductory page

 

Step 2: Select the analysis tool you wish to configure

The Analysis Tools page allows you to select which analysis tool to configure:

Tools page

 

Step 3: Select your PC-lint installation folder

The first thing the Configuration Wizard needs to do is to locate your PC-lint installation folder.

If PC-lint has been installed using its installation wizard, Visual Lint will be able to discover the location of this folder from the registry key HKEY_LOCAL_MACHINE\Software\PC-lint\CONFIG\Version 9.0 (PC-lint 9.0) or HKEY_LOCAL_MACHINE\Software\PC-lint\CONFIG\Version 8.0 (PC-lint 8.0).

If these keys are not present or the installation has subsequently been moved you will need to enter the location of your PC-lint installation manually in the Analysis Tool Installation Folder page:

Analysis Tool Installation Folder page

Once set, this path is recorded in the registry for subsequent use.

 

Step 4: Select the std.lnt and options.lnt files to use.

Once the location of your PC-lint installation has been defined, the PC-lint Analysis Configuration File and PC-lint Warning Policy File pages will allow you to to choose whether to create new std.lnt and options.lnt indirect files or use existing ones. In the former case, the wizard will guide you through the process of creating both files; in the latter the wizard will allow you to edit their contents:

Analysis Configuration File page Warning Policy File page

 

Step 5: Configure the contents of std.lnt

If a new std.lnt file is being generated, the PC-lint Compiler Configuration, PC-lint Library Configuration, PC-lint Author Recommendations and PC-lint Warning Level pages allow you to define the contents of the indirect file using a straightforward interface. Where possible, appropriate default options will be offered for each supported environment:

Compiler Configuration page Library Configuration page Author Recommendations page Warning Level page

The main aim of these pages is to configure which indirect (.lnt) files should be used within the PC-lint analysis configuration defined in std.lnt. Where possible, appropriate project type dependent defaults will be offered. See std.lnt for an example of a complete std.lnt indirect file.

By default only those indirect files available in the PC-lint installation folder or supplied with Visual Lint will be shown. You can download additional indirect files from the PC-lint patch pages provided by Gimpel Software at:

In Visual Lint 3.0 onwards, details of the development environment's global include folders for the need not be included in std.lnt as they are automatically written to a generated .lnt file for each project.

 

Step 6: Preview and edit your configuration files

Finally, the Preview page shows a preview of the text which will be written to both configuration files. In both cases, you can edit the text further here before proceeding:

Preview page

Examples of complete std.lnt and options.lnt files are available in the Reference Guide.

 

Step 7: Save the changes

Once you are satisfied with the changes Visual Lint will make to the PC-lint configuration files, proceeding through the Completion page will write the new indirect files to disk, whereafter they will be available for analysis purposes.

Completion page

It should be noted that the Configuration Wizard is not the only way to configure Visual Lint, as it is also possible to configure it manually via the Visual Lint Options command on the toolbar or (where available) the "Tools" menu.



Copyright © 2004 - 2015 by Riverblade Ltd. All rights reserved.