Warnings Plugin

Skip to end of metadata
Go to start of metadata

Plugin Information

Plugin ID warnings Changes In Latest Release
Since Latest Release
Latest Release
Latest Release Date
Required Core
Dependencies
4.40
Mar 08, 2014
1.424
violations (version:0.7.11, optional)
analysis-core (version:1.55)
dashboard-view (version:2.2, optional)
token-macro (version:1.5.1, optional)
maven-plugin (version:1.424, optional)
Source Code
Issue Tracking
Maintainer(s)
GitHub
Open Issues
Ulli Hafner (id: drulli)
Usage Installations 2013-Apr 6739
2013-May 6818
2013-Jun 6923
2013-Jul 7174
2013-Aug 7158
2013-Sep 7275
2013-Oct 7560
2013-Nov 7419
2013-Dec 7371
2014-Jan 7782
2014-Feb 8004
2014-Mar 8346

This plugin generates the trend report for compiler warnings in the console log or in log files.

Installation Requirements
This plug-in requires the utility plug-in "analysis-core" (called "Static Analysis Utilities" in the update manager). Please ensure that the latest version of this plug-in is also installed.

It's about 5 years now since my first Jenkins commit. I hope that you all enjoy using my static code analysis plug-ins and that these plug-ins are very helpful for your projects! There is now an easy way to support the development of these open source plug-ins I just released my Android game Inca Trails. So feel free to support my work for Jenkins by buying this game in Google Play. Of course, the game is worth its price anyway

Description

This plug-in is supported by the Static Analysis Collector plug-in that collects different analysis results and shows the results in aggregated trend graphs. Additionally, health reporting and build stability is also based on the aggregated results.

You need to add the post-build action scan for compiler warnings to actually get warnings. (By default none will be generated.) 

Select one or more parsers corresponding to the warnings you want to get. Each parser will generate a specific warning. Parser javac generates Java Warnings. The Maven parser generates Maven Warnings. Etc... 

The Warnings plug-in scans the console log or specified log files for warnings of different formats and reports the number of warnings found. This plug-in is part of the suite of static code analysis plug-ins that are documented on a separate WIKI page.

  • Support for javac (ant, maven, command line), Eclipse Java Compiler, JavaDoc Compiler, Hudson/Jenkins HPI, MSBuild, GCC, GNU Linker, SUN Studio C++, Gnat (Ada), Erlang, PC-Lint compiler warnings (configuration of PcLint), Eclipse Buckminster, Oracle Invalids, Doxygen, Robocopy, Perforce, Cobol, PHP, Flex, YUI Compressor, puppet-lint, FxCop, C++ lint, CSSLint, JCReport, JSLint, Pep8, PYLint, StyleCop, IBM XL C/C++ Compiler and Linker, NAG Fortran Compiler, GNU Fortran Compiler, Resharper Commandline Tools, Microsoft PREfast, Imported from the violations plug-in: Codenarc, Gendarme
  • Build summary showing the new and fixed warnings of a build
  • Several trend reports showing the number of warnings per build
  • Overview of the found warnings per module, package, category, or type
    • Parsing of Maven pom.xml or Ant build.xml configuration files to obtain the module or project name
    • Parsing of Java or C# files to obtain the package or name space name
  • Detail reports of the found warnings optionally filtered by severity (or new and fixed)
  • Colored HTML display of the corresponding source file and warning lines:
    • Direct link to the warning line
    • Highlighting of single lines as well as line ranges
    • Highlighting of multiple line ranges per warning (different color for primary range)
    • Tool tip describing the warning message
  • Failure threshold to mark a build as unstable
  • Configurable project health support
  • Works with the freestyle and native m2 build option (activated on goal compile)
  • Remote API to export the build quality and found warnings
  • Several tokens to simplify post processing of the results
  • Localization available for: DE, JA (Please help to localize findbugs for your locale!)

The current release is available in the download section. This plug-in is developed and maintained by Ullrich Hafner. Please use the mailing lists or issue tracker to ask questions, create feature request or bug reports, since I don't read the comment section on this page regularly.

Adding support for new warning types

If there is a parser missing, then you can simply extend the available set of parsers using one of the following methods.

Defining a new parser using the user interface

Since release 3.8 you can define new parsers dynamically in the system configuration section of Jenkins. Just navigate to http://[jenkins-url]/configure and create a new parser in section Compiler Warnings. The UI should be self explanatory, if there is something missing, please let me know on the mailing lists.

Writing a new parser that should be included in the warnings plug-in

Extending the existing set of supported warning formats is quite easy. If the format of the warnings messages could be parsed by an regular expression, then you only need to provide a new parser class and a corresponding test case:

  1. Set up your developing environment as described in the Plugin tutorial
  2. Clone the warnings plug-in from GitHub
  3. Run maven with the command mvn install to see if the plug-in builds before you change anything
  4. Add a new class YourFormatParser to the package hudson.plugins.warnings, see GccParser or JavacParser as examples
  5. Add a new test case YourFormatParserTest to the package hudson.plugins.warnings, see GccParserTest or JavacParserTest as examples.
  6. Note that the parser is automatically registered using the @Extension annotation
  7. Send a pull request to get your changes integrated

Writing a new standalone parser that will be deployed in a new plug-in

If your parser is only of interest for your team or company then you can also develop a parser that will be bundled into a separate and private plug-in. The development approach is quite similar:

  1. Set up your developing environment as described in the Plugin tutorial
  2. Create a new plug-in that depends on the latest release of the warnings plug-in
  3. Add a new parser class that implements WarningsParser. If your parser is based on regular expressions, then consider extending from either RegexpDocumentParser (multi-line parser) or RegexpLineParser (single-line parser).
  4. Annotate your class with @Extension
  5. Package your plug-in and deploy it to your Jenkins instance

Changelog

You can support the development of this open source plug-in by buying my Android game Inca Trails in Google Play!

Release 4.40

  • Added support for PREfast Visual Studio Tools (thanks to Charles Chan for the pull request)
  • Fixed validation of Groovy parsers when lineNumber property is used (issue #21569)

Release 4.39

  • Added support for Resharper commandline tools (issue #21596, thanks to Rafał Jasica for the pull request)
  • Expose the current line number in Groovy parsers (issue #21569)
  • Added support for tycho 0.19.0 (issue #21377, thanks to Uwe Petschke for the pull request)
  • Improved Java parser to parse annotation warnings (issue #21240)
  • Fixed icon URLs (issue #21510)

Release 4.38

  • Fixed serialization of GNU Make and C Compiler warnings (issue #20558)

Release 4.37

  • Fixed serialization of GNU C Compiler warnings (issue #20545)

Release 4.36

  • Added new parser for GNU Fortran compiler (thanks to Mat Cross for the pull request)
  • Improved naming of several C compilers (thanks to Mat Cross for the pull request)
  • Improved regular expression of MS Build parser to catch Visual studio messages (issue #19425)

Release 4.35

  • Added a view column that shows the number of warnings in a job
  • Fixed broken trend graph in dashboard (issue #19425)

Release 4.33

  • Show affected console log when selecting a maven warning

Release 4.32

  • Make dependency to ant-plugin optional (issue #17496)
  • Added support for JSLint warnings in Checkstyle format (issue #19127)
  • Extract column number from warnings where available
  • Improved IAR parser

Release 4.28

  • Don't show trend and health reports of aggregated warnings (issue #18852)
  • Fixed handling of localized warning messages in Doxygen parser (issue #18913, thanks to Olaf Mandel for the pull request)
  • Fix sorting of warnings that are on same line but different column (issue #19047)
  • Show results of threshold evaluation also in console log (issue #18954)
  • Escape XML symbols in warning messages (issue #17309)

Release 4.27

  • Implemented new parsers for Perl::Critic, JCReport, CSSLinit, PyLint, Pep8, StyleCop based on the existing violations plug-in parser that now work in slave builds (issue #17786, thanks to Mihail Menev, Johann Vierthaler, Sebastian Seidl, Sebastian Hansbauer, Marvin Schütz for the patches!)
  • Added a new parser for NAG Fortran Compiler (thanks to Mat Cross for the patch!)
  • Added support for fatal errors in Wind River Diab Compiler (C/C++) parser (issue #17075, thanks to Sebastian Seidl for the patch!)
  • Improved regular expression of IAR parser for EWarm 6.3 compiler
  • Improved regular expression of Cpp-Lint parser (issue #18290)
  • Fixed NPE when a parser of the violations plug-in is used (issue #15492 thanks to benny-shotvibe for the patch!)
  • Added aggregated result that are exposed via the REST URL warningsResult (issue #17767, thanks to Sebastian Hansbauer, Marvin Schütz for the patch!)
  • Added some more fields that are exposed via the REST API (issue #17767, thanks to Mihail Menev, Johann Vierthaler for the patch!)
  • Added Traditional Chinese translations (thanks to Pei-Tang Huang!)
  • Added system configuration option to disable console logging of all static analysis plug-ins (issue #15246, thanks to Sebastian Seidl for the patch!)
  • Added system configuration option to fail a build when one of the static analysis plug-ins fails parsing its input (issue #17663, thanks to Mihail Menev and Johann Vierthaler for the patch)
  • Fixed broken encoding handling in maven jobs (issue #17657, thanks to André Lehmann!)

Release 4.26

  • Added three new parsers from the violations plug-in: Perl::Critic, StyleCop, PyLint (issue #17911)
  • Fixed parser matching problems after name change of CLANG parser (issue #17762)

Release 4.25

Release 4.23

  • Show more details in the fixed warnings view (issue #15959)
  • Aggregate the maven parent module results in failed builds when the failure is caused by a threshold being hit (issue #15324, issue #12342)
  • Optimized http requests for static resources in the analysis plugins (issue #16571)
  • Fixed missing build overview in maven jobs (issue #16518)
  • Always use Xerces when parsing XML files (issue #15613)
  • Read pom.xml to obtain path of output files in maven jobs (issue #16250)
  • Show error message as file content if the source files could not be transferred to the master (issue #16222)
  • Improved performance of dynamic parsers (Thanks to Jesse Glick for the patch, issue #16526, issue #16107)
  • Do not show blank Maven warnings (issue #16826)

Release 4.21

  • Improved plug-in performance when dynamic groovy parsers are used (issue #16526, issue #16107, thanks to Jesse Glick for the patch)

Release 4.20

  • Added a new parser for IBM XLC Compiler and Linker (thanks to Andrew Gvozdev for the pull request)

Release 4.19

  • Improve warning category for gcc 4.6 or later (issue #11799)

Release 4.18

  • Added option to consider only stable builds when calculating new warnings (Thanks to David Pärsson for the patch, issue #15037)
  • Fixed NPE when comparing warnings (issue #15414, issue #15250)

Release 4.17

  • Fixed wrong computation of new and fixed warnings (issue #14821)

Release 4.16

Release 4.15

  • Make dependency to maven plug-in optional (issue #14727)
  • Improved performance if several dynamic parsers are defined (issue #14614)

Release 4.14

Release 4.13

Release 4.12

  • Fixed problems when Apple LLVM compiler is used with make (issue #14333)
  • Added new parser for GCC that detects the correct paths using debug messages of GNU make (thanks to Victor Hakoun)

Release 4.11

Release 4.10

  • Fixed NPE during de-serialization of 3.x configuration files (issue #14281)

Release 4.9

Release 4.7

  • Reduce memory footprint of plug-in (thanks to Kohsuke for the patches)
  • Upgrade to YUI 2.9 (support for new bread crumbs and context menus: issue #13532, thanks to OHTAKE Tomohiro for the patch)
  • Added option to suppress the automatic but time expensive resolution of relative path names (issue #14024)
  • Added support for Eclipse 3.8/4.2 compiler messages (issue #13969)
  • Added native parser for C++ Lint (issue #14018)

Release 4.6

Release 4.5

  • Added hyperlinks to build summary if threshold is exceeded (issue #12424)
  • Added parser for Apple LLVM compiler (thanks to Neil Davis for adding this parser)
  • Fixed trend graph showing the values of wrong parser (issue #13656)

Release 4.4

  • Added option to filter projects with zero warnings in the warnings dashboard portlet (issue #12984)
  • Center the affected source line in source view (issue #13491)
  • Fixed incompatibility of detail tabs with new bread crumb view (issue #13532)
  • Fixed history of warnings using the Eclipse Parser (issue #13573)
  • Fixed missing JavaDoc parser (issue #13610)
  • Added new parser for Wind river Diab C++ warnings (thanks to Yuta Namiki for the patch)
  • Improved IAR Parsers (thanks to Johan Holmberg of IAR for the valuable help): please use option --no_wrap_diagnostics when running the compiler

Release 4.3

  • Fixed deserialization of warnings trend graph portlet

Release 4.0

  • Added a new portlet that shows the warning totals as a line graph
  • Results are now shown separately for each parser (issue #10319): i.e., links, trend graphs, result summary, detail pages, etc. are shown for each active parser. Even images are customizable, so if you would like to change the default image for your favorite parser please send me a corresponding image. You can have a look at the Java parser for an example.
  • Added new parser for Maven Console warnings
  • Added parsers of the violations plug-in (if the violations plug-in is installed):
    • Codenarc
    • CppLint
    • CSSLint
    • FxCop
    • Gendarme
    • JCReport
    • JSLint
    • Pep8
    • PYLint
    • StyleCop

Release 3.28

Release 3.27

  • Added support for puppet-lint (pull request by Jan Vansteenkiste)
  • Improved YUI Compressor parser (patch by Emidio Stani)
  • Fixed slave parsing with dynamic (Groovy script) or custom (extension point) parsers (issue #12280, issue #11926)

Release 3.26

  • Fixed initialization problem when configuring the warnings plug-in. (issue #12075)

Release 3.25

  • Fixed NPE while configuring a graph with no builds yet (issue #12045)
  • Group warnings by relative path if the associated language has no package or namespace concept (issue #11846)
  • Allow skipping of calculating "new" issues (issue #11761)
  • Fixed display of 'Use delta for new warnings' option (issue #11758)
  • Ignore 'new warnings' threshold in the first build (issue #11718)
  • Ignore console annotations when scanning for warnings (issue #11675)
  • Stop parsing immediately if user presses cancel (issue #11792)
  • Added support for Armcc warnings (Thanks to Emanuele Zattin for this patch)

Release 3.24

  • Improved performance of console annotation filtering (issue #11675)

Release 3.23

  • Fixed parsing of file names if console log is decorated with notes (issue #11675)

Release 3.22

  • Added parser for YUI Compressor (issue #4502)
  • Fixed enlarge link for trend graphs (issue #11324)
  • Fixed visibility of 'enable trend graph' link
  • Fixed reading of results if analysis is invoked during 'mvn site' (issue #10820)

Release 3.21

  • Ignore failed builds when evaluating the build history in trend graphs and new warnings calculation (issue #10682)
  • Added OSGi bundle detection when grouping warnings by module (issue #10681)
  • Use the path as a replacement for the package grouping for all warnings that are not from Java or C# files (issue 2)
  • Cancel parsing if the build has been aborted by the current user (issue #10627, issue #9158)
  • Start from workspace root when scanning for warnings in m2 projects (issue #10332)
  • Improved MS Build warnings (issue #10566)

Release 3.20

  • Fixed broken file names if the warning message is prefixed by an ant goal (issue #9926)

Release 3.19

  • Added option to specify different parsers for console log and for workspace files (issue #8833)
  • Added new tokens for token macro plug-in (issue #10027): now tokens WARNINGS_NEW, WARNINGS_FIXED, WARNINGS_COUNT and WARNINGS_RESULT are available.

Release 3.18

  • Added new trend graph that shows the total number of warnings with auto-scaled range axis (issue #9745)
  • Added persistence for example field when configuring a Groovy parser (issue #9535)
  • Fixed broken result images in build summary (issue #9997)

Release 3.17

  • Added new extension point to simplify creation of project or tool specific parsers
  • Fixed broken detail views when using a reverse proxy (issue #3410, thanks to Benjamin Cabé for the fix)
  • Show the reference build that is used to compute new and fixed warnings (when build thresholds are set)
  • Improved logging statements when build is executed on a slave

Release 3.16

  • Added configuration option to enable automatic project and module name detection by reading all Ant project.xml and Maven pom.xml files (issue #8915, issue #9090)
  • Added preliminary support for the Token Macro Plugin: WARNINGS_COUNT expands to the number of warnings and WARNINGS_RESULT expands to the plug-in build result (stable, unstable, failed)

Release 3.15

  • Fixed missing dependency to Hudson/Jenkins 1.395 (issue #8509)

Release 3.14

  • Jenkins update to links and documentation
  • Show progress text while dashboard portlet graphs are created

Release 3.13

  • Added support for multi-configuration projects (issue #6772)
  • Fixed false positives in Javadoc parser (issue #8630)

Release 3.12

  • Added support for multi-configuration projects (issue #6772)Release 3.12
  • Added support for multi-line warning messages in user definable parsers (issue #8399)
  • Improved MS Build parser to also handle Stylecop warnings (issue #8347)
  • Improved JavaDoc parser (issue #7718)
  • Fixed sorting of date labels of dashboard trend graphs (issue #8476)
  • Fixed evaluation of builds that will be considered in the dashboard trend graph (issue #8283)
  • Fixed warnings totals counter (issue #7775)

Release 3.11

  • Added new parser for GHS Multi compiler warnings (thanks to Joseph Boulos for the patch)
  • Added build status thresholds for each warning priority (issue #3561)
  • Fixed parsing of file names if console log is decorated with notes (issue #7417)
  • Fixed parsing of tycho Eclipse Java compiler warnings (issue #4996)

Release 3.10

Release 3.9

  • Fixed parsing of multi-line Eclipse warnings (issue #7077)

Release 3.8

  • Added a new generic parser that can be configured in the UI to enable parsing of project specific warning messages without the need of extending the plug-in (issue #3895).
  • Fixed ant links (issue #6862)
  • Fixed parsing of multi-core build with MS Build (issue #6709)
  • Fixed parsing of doxygen 1.7.1 messages (issue #6971)
  • Fixed computation of module names for maven projects (issue #6768)
  • Don't report an error message if a maven module does not contain a report file (issue #6895)

Release 3.7

  • Fixed naming of maven modules (issue #6513)
  • Group files by path if there is no package or namespace found (issue #6698)

Release 3.6

Release 3.5

  • Added trend graph portlets for the dashboard view
  • Added option to start the plug-in even for failed builds (issue #6117)
  • Added 'enlarge' link for trend graphs that shows a detail page with the graph
  • Fixed ordering of warnings in detail views (issue #6132)
  • Fixed warning distribution graph in files detail view (issue #6139)

Release 3.4

Release 3.3

  • Added parser for PHP warnings (thanks to Shimi Kiviti for the patch)
  • Added parser for Flex SDK warnings (thanks to Vivien Tintillier for the patch)
  • New warnings computation is now based on the current build and the reference build (i.e., the last successful build, see issue #5147)
  • Visualized plug-in build status (based on the healthiness thresholds)
  • Added high scores for successful builds
  • Improved warnings detection for the Intel C++ compiler 11.1 (issue #5402)
  • Fixed handling of arrays in warning messages (issue #5868)
  • Don't show project action if there are no warnings (issue #5473)
  • Don't show trend graph configuration on job creation (issue #5294)
  • Improved remote API, now the warning keys are also exposed (issue #5195)

Release 3.2

Release 3.1

  • Added parser for AcuCobol warning messages (issue #5024, thanks to Jerry Shea for the patch)
  • Improved MSBuild parser to also display sharepoint warnings (issue #4731)
  • Fixed regular expression for GCC parser (issue #4707)
  • Fixed trend report link if there are no results available yet (issue #5156)
  • Fixed preview of trend reports
  • Added dependency to Hudson 1.337 due to a class loader bug in previous versions (issue #4993)

Release 3.0

  • Extracted common code of the static code analysis plug-ins into a new utility plug-in "analysis-core"
  • Several bug fixes and small improvements

Release 1.x-2.x Changelog

Labels

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

Add Comment