Cppcheck Plugin

Skip to end of metadata
Go to start of metadata

Plugin Information

Plugin ID cppcheck Changes In Latest Release
Since Latest Release
Latest Release
Latest Release Date
Required Core
Dependencies
1.15
Mar 22, 2014
1.447
javadoc (version:1.0)
ivy (version:1.19, optional)
maven-plugin (version:1.447)
dashboard-view (version:2.0, optional)
Source Code
Issue Tracking
Maintainer(s)
GitHub
Open Issues
Gregory Boissinot (id: gbois)
Michal Turek (id: mixalturek)
Usage Installations 2013-Apr 1910
2013-May 1929
2013-Jun 1982
2013-Jul 2078
2013-Aug 2074
2013-Sep 2126
2013-Oct 2241
2013-Nov 2272
2013-Dec 2262
2014-Jan 2344
2014-Feb 2371
2014-Mar 2499

This plugin generates the trend report for CppCheck, a tool for static C/C++ code analysis.

Description

The Cppcheck plug-in scans for Cppcheck report files in the build workspace and reports the issues detected during static C/C++ code analysis.

The following features are provided by this plug-in:

  • Configuration of the files to scan after a build, build status evaluation and graph.
  • Trend reports showing the number of detected issues per type.
  • Results summary and results details including new issues and solved issues.
  • Listing of source code with highlighted issues.
  • Dashboard View portlet showing number of issues per job.
  • Remote access API (REST API).
  • Works with most project/job types.

Please use the Mailing Lists or issue tracker to ask questions, create feature request or bug reports.

Screenshots

Version 1.15

Usage

  • Install Cppcheck tool to the system. If you use master Jenkins server and several build slaves, install it to all slaves that will run the analysis.
  • For each job configuration page:
    • Add Execute shell build step to generate Cppcheck report or create the report file in your build scripts (Ant, Maven, Make, ...).
    • Activate Publish Cppcheck results in Post-build Actions and provide at least the path to the generated Cppcheck report (cppcheck.xml).
    • Optionally configure build status evaluation (Advanced button).
    • Optionally configure graph (second level Advanced button).
# Minimal set of arguments
cppcheck --xml --xml-version=2 SOURCE_DIRECTORY 2> cppcheck.xml

# Enable all checks
cppcheck --enable=all --inconclusive --xml --xml-version=2 SOURCE_DIRECTORY 2> cppcheck.xml

# Analysis in multiple parallel threads
cppcheck -j 4 --enable=all --inconclusive --xml --xml-version=2 SOURCE_DIRECTORY 2> cppcheck.xml

Remote access API (REST API)

Use the URLs below to access the Cppcheck specific data.

Description of possibilities

Data

Example of XML data:

<cppcheckStatistics>
	<numberErrorSeverity>0</numberErrorSeverity>
	<numberInformationSeverity>7</numberInformationSeverity>
	<numberNoCategorySeverity>0</numberNoCategorySeverity>
	<numberPerformanceSeverity>20</numberPerformanceSeverity>
	<numberPortabilitySeverity>0</numberPortabilitySeverity>
	<numberStyleSeverity>22</numberStyleSeverity>
	<numberTotal>54</numberTotal>
	<numberWarningSeverity>5</numberWarningSeverity>
</cppcheckStatistics>

Example of JSON data:

{
	"numberErrorSeverity" : 0,
	"numberInformationSeverity" : 7,
	"numberNoCategorySeverity" : 0,
	"numberPerformanceSeverity" : 20,
	"numberPortabilitySeverity" : 0,
	"numberStyleSeverity" : 22,
	"numberTotal" : 54,
	"numberWarningSeverity" : 5
}

Known Issues

Changelog

Release 1.15 (March 22, 2014)

  • Fixed: JENKINS-17363 - Ludicrously slow load time (with lazyloading)
  • Fixed: JENKINS-19437 - Implement load on demand functionality in Cppcheck
  • Fixed: JENKINS-22073 - ProjectAction should render graph, optimize build.xml size
    • Changes in data storage that heavily reduces memory consumption and increases performance during a common Jenkins use.
    • Stored data now contains only statistics per type (just several numbers), full report is lazy-loaded only while it is needed in the results page. Compare with parsing of a giant XML that contains all information about each issue detected by Cppcheck and multiply by number of builds just to show a simple trend graph.
    • Data format is very different but the code should satisfy a backward compatibility.
    • The plugin update will have full impact after all builds from a previous version will completely role out and only new data are present.
  • Fixed: JENKINS-17450 - "warning" and "performance" not counted
  • Fixed: JENKINS-18029 - Selected line with static analysis violation is hidden because breadcrumb covers it
  • Fixed: JENKINS-17540 - ConversionException reading build.xml
  • Fixed: JENKINS-21346 - Not working with cppcheck 1.63
  • Fixed: JENKINS-22114 - When looking at the source code of an error - the latest source is used
  • Fixed: JENKINS-7279 - cppcheck plugin will not show results for multiconfiguration project
  • Fixed: JENKINS-22214 - Fix findings from FindBugs static analysis
  • Fixed: JENKINS-22213 - Broken backward compatibility with version 1.14
  • Implemented: JENKINS-22215 - Side panel menu is missing on pages with listing of source codes
  • Implemented: JENKINS-21928 - Redesign of results page
  • Implemented: JENKINS-21927 - Redesign of build summary page
  • Implemented: JENKINS-10651 - Add cppcheck to "Dashboard View"
  • Implemented: JENKINS-14481 - Quickly identify only the new errors
  • Rejected: JENKINS-21714 - More data from REST API
  • Rejected: JENKINS-16700 - Parsing throws exceptions. javax.xml.bind.UnmarshalException
  • Rejected: JENKINS-20894 - When the upstream build fails,it won't show cppcheck test results
  • All existing Jira tasks with Resolved status checked, optionally tested and closed.
  • Description, Screenshots, Usage, Remote access API and Known Issues sections added to wiki.

Release 1.14 (October 7, 2013)

* Add option to not fail builds if a report is not found.

Release 1.13 (December 19. 2012)

* Fix JENKINS-14908 - Enable Maven project support.

Release 1.12 (November 12, 2012)

* Fix JENKINS-15707 - Cppcheck Trend graph is blank even though the plugin processes stats correctly

Release 1.11 (November 04, 2012)

* Fix JENKINS-15523 - cppcheck: WARNING: Failed to resolve class

Release 1.10 (July 18, 2012)

* Fix internal error by computing between newError and previousError: wrong inverse between performance severity and information severity

Release 1.9 (May 5, 2012)

* Fix JENKINS-13657 - Cppcheck does not work with the "Flexible Publish Plugin"

Release 1.8 (May 1, 2012)

* Fix JENKINS-13589 - Calculation errors of threshold crossing

Release 1.7 (April 22, 2012)

* Fix JENKINS-12364 - Cannot drill down to source code with cppcheck when build source is checked out using SVN

Release 1.6 (April 21, 2012)

* Fix JENKINS-11114 - Separate errors report on build report page by severity type.

Release 1.5 (April 21, 2012)

* Fix reopened JENKINS-10368 - Wrong image dimension for Cppcheck Results link on Dashboard

Release 1.4 (April 20, 2012)

* Fix JENKINS-12504 - cppcheck-plugin doesn't display the latest source when cppcheck-plugin is the cause of a build failure

Release 1.3 (April 18, 2012)

* Fix JENKINS-12301 - Cppcheck always display all errors
* Fix JENKINS-12382 - Typo with displayed text for cppcheck plugin configuration in Jenkins

Release 1.2 (February 06. 2012)

* Merge pull request - Add a link to the line number

Release 1.1 (January 01, 2012)

* Fix reponed JENKINS-11096 - No cppcheck reports found if they stored in workspace
* Fix reponed JENKINS-11065 - Add cppcheck version to the result page

Release 1.0.2 (September 28, 20111

* Fix JENKINS-11096 - No cppcheck reports found if they stored in workspace

Release 1.0.1 (September 20, 2011)

* Fix JENKINS-9178 - Cppcheck plugin missing files if used by a matrix project

Release 1.0.0 (August 01, 2011)

* Fix JENKINS-10369 - CppCheck results missing File and line num when xml-version=2 is used
* Fix JENKINS-9727 - CPP Check should support new xml output format (version 2)

This new version supports the new Cppcheck output format (version 2).
For old output, the new mapping is:

New Category Old Category
error error
warning possible error
style style
performance possible style
information no category

Release 0.17 (June 17, 2011)

* Fixed JENKINS-9727 - Add Cppcheck version 2 support
* Updrade the dependency of Ivy pluign to 1.19

Release 0.16 (June 15, 2011)

* Fixed JENKINS-9726 - Cannot handle empty files

Release 0.15 (March 23, 2011)

* Rerelease 0.14 to properly set required Jenkins version

Release 0.14 (March 12, 2011)

* Fixed JENKINS-8559 - CppCheck links to last success or unstable build, even when the current build fails due to CppCheck errors

Release 0.13 (Feb 27, 2011)

* Fixed JENKINS-6990 - List of files not correctly displayed when providing several XML files.

Release 0.11 (Feb 21, 2011)

* Fixed JENKINS-8668 - Publish cppcheck results option not available in Ivy project
* Updated to Jenkins 1.397 API and metadata

Release 0.10.3

* Fixed issue #7448

Release 0.10.2

* Fixed a java.lang.NullPointerException when the file attribute for an error is not specified.

Release 0.10.1

* Integrated issue #6862 fix

Release 0.10

* Fixed issue #6046
* Fixed issue #5983
* Added restriction to view sources only to users who has the 'WORKSPACE' permission.

Release 0.9

* Added backward compatibility with the cppceck plugin 0.6 (except to display source code)
* Added a notification in the updateable list of plugins if a version of the plugin before version 0.7 was installed.

Release 0.8

* An empty source file or a directory as a the value of the file attribute are managed for the cppcheck result file

Release 0.7

* Added the ability to display cppcheck trend for each severity and the sum of all severities
* Fixed issue #4322 (Added the ability to reach source files on a slave node)

Note : this version requires Hudson 1.321+.

Release 0.6

* Some check boxes has been introduced to select the severities for build health
* Migrated to the cppcheck release (1.35)
- The "all" severity is renamed to "possible error"
- The "all style" severity is renamed to "possible style"

Release 0.5.2

* Fixed building on slaves (java.io.NotSerializableException: java.io.PrintStream)

Release 0.5.1

* Spelling correction

Release 0.5

* Added remote API for the plug-in results

Release 0.4

* Correction of the ambiguity of the analysis of workspace and module roots

Release 0.3

* Collecting multiple analysis files

Release 0.2

* Added the ability to go through source code
* Added the ability to configure the build status and health

Release 0.1

* Initial Release

Labels

Edit
plugin-report plugin-report Delete
plugins plugins Delete
plugin plugin Delete
supports-dashboard-view supports-dashboard-view Delete
Enter labels to add to this page:
Please wait 
Looking for a label? Just start typing.

Add Comment