Propagation issue: Too many same defects in a file
When configured, the kwadmin same_kind_defect_per_file_threshold
property prevents an integration or CI build from being loaded into the project if any file contains defects of the same type (for example, ABV.EXAMPLE) that exceed the specified threshold. This is particularly useful for large projects with slow builds.
- Allowable values: Numerical value; a value of 0 will turn off the threshold limit and allow for an unlimited number of same defects
- Default value:
0
- Recommended value:
5000
We suggest that you set a default threshold value on your template "workspace" project. New projects will use this value (existing projects will not be affected).
kwadmin set-project-property workspace same_kind_defect_per_file_threshold <value>
To fail a build when any uploaded file exceeds the threshold number of defects of the same type, run the following command, setting <project> to your desired project and <value> to your desired threshold:
kwadmin set-project-property <project> same_kind_defect_per_file_threshold <value>
For example:
kwadmin set-project-property Toolbus same_kind_defect_per_file_threshold 5000
When you run an analysis or load a build, the console will print the following:
- A warning if a defect threshold of 5000 is exceeded.
- An error if the defect threshold that you set for the project is exceeded.
If you have a build that fails due to exceeding the configured defect threshold, consider the following actions:
- Use an .sconf to suppress the noisy defects for specific files
- Disable noisy checker in your project
- Change your configured threshold limit if you wish to allow these builds to pass
- Ignore the configured defect threshold check with the ignore-defect-threshold mechanism for kwadmin load/validate admin load or kwciagent load (for CI builds)