Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-72793

Add option to allow multiple occurrences of causes

XMLWordPrintable

    • Icon: New Feature New Feature
    • Resolution: Unresolved
    • Icon: Major Major
    • None
    • Build Analyzer Plugin v2.5.0

      Hello,
      In our usage cases, we may have multiple occurrences of same indication in one output log (the build does not necessarily stop on error).
      There is currently no option to allow multiple occurrences of one cause (with the same indication) while it would be pretty helpful.
      Maybe it is intended and there is a bug in FailureReader.java:185:

      if (wasBefore == null || !wasBefore.contains(indication)) {
        if (processIndication(build, currentFile, resultMap, line, cause, indication,
                                              currentLine)) {
          wasBefore = new ArrayList<Indication>();
          wasBefore.add(indication);
          firstOccurrences.put(cause, wasBefore); // this overwrites completely wasBefore even if it was not null and not empty

      As for the display of these occurrences, displaying multiple times the same cause (with correct replacements of indication/matched group in description) seems OK, but you could also add a field "Occurrence Description" which would allow the following:

      CauseMissingImport
      Name: Missing import
      Description: The build likely failed because an import is missing.
      Occurrence Description: Did you forget to import ${1,1}?
      Indications: ^Missing import (.*)$

       

      Fake Log :

      Missing import Bar.h
      Missing import Foo.h

       

      Would output :

      Identified problems

      Missing import

      The build likely failed because an import is missing.

      Did you forget to import Bar.h?
      Indication 1
      Did you forget to import Foo.h?
      Indication 1

            t_westling Tomas Westling
            northblue333 North
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: