List Klocwork defects

listDefects(projectFolder, severities, taxonomies, statuses, scope, includeStream, files, issueCodes, countOnly, customProjectDir)

Lists up to 20 Klocwork defects from a local project, filtered by: severity, taxonomy, status, scope, file path, and checker issue code.

Purpose

Allows AI agents to query Klocwork defects from a local project.

Parameters

Parameter Format Description Example
projectFolder string The path to the project folder "path/to/project/folder"
severities array The Klocwork defect severities [1, 2]
taxonomies array The Klocwork defect taxonomy names ["Java", "C and C++"]
statuses array The Klocwork defect statuses ["Analyze", "Fix"]
scope string The Klocwork defect scopes "local"
includeStream boolean Determines whether to include Klocwork defects from stream projects false
files array The absolute file path of source files ["/path/to/src/test.cc"]
issueCodes array

The Klocwork checker codes

["ABV.GENERAL"]
countOnly boolean Returns a summary and breakdown instead of a list of defects true
customProjectDir string The name of the Klocwork project data directory, if using a non-default .kwlp Klocwork local project directory "/path/to/src/custom_kwlp"