Kwpyspecimport

If you're already analyzing your projects and have a '.pylintrc' file available, you can use this tool to help you get setup with Klocwork Static Analysis more quickly since it takes care of much of the configuration. In order to see any python-related issues, you need to import the provided python taxonomy ('py.base.tconf').

This command produces a python build specification options file based on the '.pylintrc' file you point it to, and produces a .pconf file based on the pylint checkers that are enabled in your '.pylintrc' file. This options file can be used in kwpyspec command to create the python build specification file.

When running this script, you need to use python3; you can also use the instance installed in your python folder, for example, 'C:\Klocwork\Server 23.1\python3\python'.

Usage

python kwpyspecimport.py [<options>]

where <options> are any arguments required for your build.

Examples

python kwpyspecimport.py -c <path-to-configfile>
C:\Klocwork\Server 22.3\python3\python kwpyspecimport.py -c <path-to-config-file> --pconf-file-name <pconf-file-name> --options-file-name <options file name>

Options

Name (and short name) Description
--help (-h) display help
--config-file (-c) specifies the python '.pylintrc' configuration file you want to use as the basis for your Klocwork build specification
--options-file-name (-o) specify the kwpyspec options file name (the default is 'kwpyspec.opt')
--pconf-file-name (-p) specify the pconf file name (the default is 'analysis_profile.pconf')
--file (-f) specify the file or folder(s) you want to analyze