This feature allows for quick, incremental analyses of changed source files to enable pre/post-checkin/commit-like behavior . The goal is that only changed files are analyzed by the Klocwork kwciagent tool to replicate the local analysis developers would perform by using our supported IDE plugins or the command line utility. To enable this behavior, the plugin takes a list of the changed files from the SCM; this enables the system to analyze only the changed files when the workspace isn’t kept. Leave this cleared to analyze the whole project, or, if the workspace is kept, to perform a standard incremental analysis.
The diff file list is the file that contains the changed source files for Klocwork to analyze. All analyzed files must exist in the build specification generated by kwinject.
Note: All files to be analyzed must exist in the build specification.
If using Git, provide the previous commit that Git should perform a "diff" against. The change list between the current commit and the specified previous commit will be added to the diff file list for Klocwork to process by automatically calling "git diff <previous_commit>" during the build. Note: If you are using Git jenkins plugin to obtain source files for you pipeline job be sure to use 'Pipeline script from SCM' and specify the previous commit with the environment variable, 'GIT_PREVIOUS_COMMIT'. Also be aware that the first build in the job won't be able to access GIT_PREVIOUS_COMMIT and the first build will run full CI analysis.
If you are not using Git, or want to manually generate the change list by using Git, select this option. You will need to generate the diff file list by using a custom build-step (or similar). List one changed source file on each line of the file.