Klocwork Quality Gateway

This feature allows for quick, incremental analyses of changed source files to enable pre/post-checkin/commit like behaviour. The idea is that only changed files are analysed using the Klocwork Desktop/User tools to replicate the analysis developers would perform using Visual Studio, Eclipse or the command line utility.

Diff File List

The diff file list is the file to contain the changed source files that Klocwork should analyse. It is required that any analysed files should exist in the build specification generated by kwinject

IMPORTANT: It is required that any files to be analysed must also exist in the build specification specified

Using Git

If using Git, please provide the previous commit that Git should perform a "diff" with. The change list between the current commit and the specified previous commit will then be added to the diff file list for Klocwork to process by automatically calling "git diff <previous_commit>" during the build.

Manual

If you are not using Git, or want to manually generate the change list using Git, then please select this option. You will need to generate the diff file list with a custom build-step (or similar). Future support for more SCM tools (such as SVN, perforce) may be added depending on demand. The format of the file should be a changed source file per line

Future support for more SCM tools (such as SVN, perforce) may be added depending on demand.

Build specification to use for analysis. Path is relative to the workspace

Type:String

tablesDir

Specify the location of the tables directory, e.g. ${MY_VAR}/kwtables

Type:String

incrementalAnalysis

Type:boolean

ignoreCompileErrors

Ignore compile errors encountered by kwbuildproject. This will not ignore a return code that indicates that kwbuildproject failed to the extent that no results are generated.

Type:boolean

importConfig

Optional, provide config files to import to the project before running the analysis. If you version control the checker configuration (e.g. analysis_profile.pconf) you can provide the file here and it will be automatically imported each build

Specify multiple files separated by comma (",")

Type:String

additionalOpts

Type:String

disableKwdeploy

By default kwdeploy is run before the analysis to ensure the checkers are up to date. Enabling this setting disables it from running.

Specify the name of the build for the Klocwork server, e.g. ${MY_VAR}-${GIT_COMMIT}. If empty, Klocwork uses an auto increment to name the builds

Type:String

additionalOpts

Type:String

klocworkIssueSync: Klocwork - Cross-Project Issue Sync

syncConfig

Nested Object

dryRun

Running the cross synchronisation means reading and writing to the Klocwork database. Therefore we strongly recommend that you first try a Dry Run of the command (which skips the writing) and verify that the command works as expected.

Type:boolean

lastSync

Specify the "last synchronisation" date (i.e. how far back Klocwork should go when synchronising issue citations).

Format is "DD-MM-YYYY hh:mm:ss"

For example, "03-00-0000 00:00:00" will go back in time 3 days.

Type:String

projectRegexp

A regular expression that is used to retrieve Klocwork projects that should be processed during synchronisation. For all projects leave empty.

For example, if you prepend projects with "DEPT-" to indicate a particular department the regular expression "^DEPT-" will match all these projects

klocworkQualityGateway: Klocwork - Quality Gateway

Full Integration Analysis Gateway

Create multiple gateways using queries that are sent to the Klocwork server using the web api.

Filter issues based on the search query, then provide the status to set the build to, along with the threshold (number of issues to meet this criteria)

Note: unless specified the query will run with issue grouping turned off (grouping:off)

Type:boolean

gatewayServerConfigs

Array/ListNested Object

jobResult

Type:String

query

Type:String

threshold

Type:String

conditionName

Type:String

enableDesktopGateway

Incremental Diff Analysis Gateway

Set a threshold for the incremental diff analsysis gateway. Pass the build if threshold not exceeded, fail otherwise.

This checks the XML report generated by the incremental diff analysis build-step. You can filter which issues appear in this report by providing additional options to the incremental diff analysis build-step.

This gateway simply counts the total number of issues in the XML report.

klocworkWrapper: Klocwork - Build Environment Settings

Install configurations are created on the
Configure System page. When used, the specified PATHs are added to the launcher to be used by any build step

Type:String

serverProject

The Klocwork server project to run a server build against or to connect a Klocwork desktop analysis to

Type:String

ltoken

(Optional) Specify a custom ltoken location. The Klocwork ltoken is used to authenticate with the Klocwork server. The default ltoken location is in the user's home directory, that is the user running the process.
More information