[ https://issues.jenkins-ci.org/browse/JENKINS-12130?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
gbois resolved JENKINS-12130. ----------------------------- Resolution: Fixed This issue was fixed in previous version > cppcheck plugin will not fail build if more than one severity.evaluation is > checked > ----------------------------------------------------------------------------------- > > Key: JENKINS-12130 > URL: https://issues.jenkins-ci.org/browse/JENKINS-12130 > Project: Jenkins > Issue Type: Bug > Components: cppcheck > Affects Versions: current > Environment: I'm running Jenkins 1.443 on a 64 bit CentOS 5.5 machine. > Reporter: brianii > Assignee: gbois > Labels: plugin > Fix For: current > > > I want to run the cppcheck plugin in a manner that will evaluate the sum of > errors and warnings to determine if my build should become unstable or fail. > I have my severity.evaluation (note that this is misspelled on the gui as > 'severiry.evaluation') configured with both severity 'error' and severity > 'warning' checked. I also have my 'Build Status' thresholds set to '0' as I > want any error or warning to fail the build. I had a build with an error in > it and my build did not fail. I've worked this issue into a small test > project and saw the same results. > Here is the console output for a project with severity evaluation configured > to consider both errors and warnings and the build status thresholds set to > '0', and a cppcheck.xml file with a single error: > Started by user anonymous > Building on master > [workspace] $ /bin/bash -xe /tmp/hudson127869.sh > + touch regtestout.xml > + touch junit.xml > [Cppcheck] Starting the cppcheck analysis. > [Cppcheck] Processing 1 files with the pattern 'cppcheck.xml'. > [Cppcheck] [WARNING] - The source file > 'file:/var/hudson/workspace/drra-mysql-32/drra/src/RecTemplate.cpp' doesn't > exist on the slave. The ability to display its source code has been removed. > [Cppcheck] Not changing build status, since no threshold has been exceeded > [Cppcheck] Ending the cppcheck analysis. > Finished: SUCCESS > Here is the console output of the same project ran with severity evaluation > configured to consider just errors (no longer warnings) and the build status > thresholds set to '0', and a cppcheck.xml file with a single error: > Started by user anonymous > Building on master > [workspace] $ /bin/bash -xe /tmp/hudson127860.sh > + touch regtestout.xml > + touch junit.xml > [Cppcheck] Starting the cppcheck analysis. > [Cppcheck] Processing 1 files with the pattern 'cppcheck.xml'. > [Cppcheck] [WARNING] - The source file > 'file:/var/hudson/workspace/drra-mysql-32/drra/src/RecTemplate.cpp' doesn't > exist on the slave. The ability to display its source code has been removed. > [Cppcheck] Setting build status to FAILURE since total number of errors > (severity 'error') exceeds the threshold value ;0'. > [Cppcheck] Ending the cppcheck analysis. > Build step 'Publish Cppcheck results' changed build result to FAILURE > Finished: FAILURE > So it appears as though the only way to get the cppcheck plugin to fail a > build is if the severity is only evaluated for a single severity level. If > multiple severity levels are configured the build will not fail. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.jenkins-ci.org/secure/ContactAdministrators!default.jspa For more information on JIRA, see: http://www.atlassian.com/software/jira