CERN Accelerating science

This website is no longer maintained. Its content may be obsolete. Please visit http://home.cern/ for current CERN information.

CodeWizard HOWTO

Author: Emmanuel Medernach

Date: 23 Jul 2001

Guide to using CodeWizard


1. Introduction

CodeWizard is a tool available for quality insurance and rule checking source file and project in C / C++.

2. Configuration file

Here is a base configuration file for CodeWizard that have to be placed in your home directory (~/.psrc).
#
# CodeWizard configuration file
#

Codewizard.RuleSet EffectiveC++ $PARASOFT/lib.%a/ecpp.so
Codewizard.RuleSet MoreEffectiveC++ $PARASOFT/lib.%a/mecpp.so
Codewizard.RuleSet KMC++ $PARASOFT/lib.%a/kmcpp.so
Codewizard.RuleSet PCS $PARASOFT/lib.%a/pcs.so
#
CodeWizard.ReportFile stderr
Codewizard.temp_directory /tmp
Codewizard.analyze_only on
      
Note that you could suppress warnings from system header files with
  Codewizard.suppress_file /some/directory/*
To use the Effective C++ ruleset
 Codewizard.RuleSet EffectiveC++ $PARASOFT/lib.%a/ecpp.so
To suppress the rule Effective C++ #7
 codewizard.suppress class * file * item ecpp-7

3. Running CodeWizard

First you have to add a link from /pttools to /afs/cern.ch/pttools. The environment is setup by a script.
 source /pttools/CodeWizard/3.1/linux/codewizard.sh
In order to use CodeWizard through your files you have to replace your compiler by codewizard in the compilation process.

This can be done by setting an environment variable, like with QPlotter:
 gmake all "USE_CODEWIZARD=1" 2> CW.out
And results will be placed into the CW.out file. You could use insra for a graphical interface by adding this line in .psrc:
 Codewizard.report_file insra

4. Links

Leave the site [CodeWizard at CERN]

Leave the site [CodeWizard User Guide]