View MathWorks Polyspace on the plugin site for more information.
This plugin integrates Polyspace® products with Jenkins for automated analysis. Polyspace® static code analysis products can prove absence of critical run-time errors using formal methods, find hundreds of classes of bugs, and check for adherence to coding rules (MISRA C, MISRA C++, JSF++) and security rules (CWE, CERT-C, CERT-C++, ISO/IEC 17961).
- Running Polyspace Bug Finder Server or Polyspace Code Prover Server on checked-in C/C++ code
- Uploading Polyspace results (bugs, run-time errors, coding standard violations, code complexity metrics and other findings) to the Polyspace Access web interface for review
- Setting up pass/fail criteria for builds based on Polyspace results
- Filtering results based on predefined criteria such as file ownership or impact of defects
- Sending e-mail notifications with new findings to file owners
You require these products to use the MathWorks Polyspace plugin in Jenkins:
- To run a Polyspace analysis, install Polyspace Bug Finder Server or Polyspace Code Prover Server. The installation provides executables for running Polyspace, uploading results to the Polyspace Access web interface (if configured) and exporting results to a text file.
- To review Polyspace results along with source code and details on an interactive web view, set up the components required to host the Polyspace Access web interface.
For installation steps, see Polyspace documentation.
Note: These Polyspace products are available in MathWorks releases R2019a and beyond. For releases prior to R2019a, you can use the Jenkins plugin with an installation of the desktop products, Polyspace Bug Finder or Polyspace Code Prover, and use the older Polyspace Metrics web interface to host results. However, the Polyspace Metrics web interface shows only an overview of Polyspace results for a project. To see the result details, you have to download the results back to the desktop product.
After you install Polyspace Bug Finder Server or Polyspace Code Prover Server and set up the Polyspace Access (or Polyspace Metrics) web interface, you can use the Jenkins plugin to run Polyspace during continuous integration. To start using the plugin:
- Configure the plugin to point to your Polyspace Server installation folder and Polyspace Access server settings.
- Set up a Jenkins project to run a Polyspace analysis in isolation or along with other scripts.
- In the Build Environment section of a Jenkins project, refer to a specific Polyspace Server installation and Polyspace Access server.
- In the Build section of the project, enter Windows batch files or Shell scripts to run Polyspace.
- In the Post-build Actions section of the project, set up e-mail notification to send e-mails with Polyspace result files created through your build scripts. You can send a common e-mail to all recipients or send individual e-mails to file owners. The Polyspace result files contain a list of results along with links to results in the Polyspace Access web interface.
For a quick start tutorial and example scripts, see the MathWorks Polyspace plugin github repository. For examples of Polyspace commands, see Polyspace Bug Finder Server documentation or Polyspace Code Prover Server documentation.