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

Silently ignore empty files when parsing for warnings

      If I have no warnings/infos/errors in my doxygen log the analysis result in an error. This should not happen as this is the target state.

      Here the console log ouput of the plugin

      19:16:48 [Doxygen] [-ERROR-] Skipping file 'Dokumente\doxy.log' because it's empty
      19:16:48 [Doxygen] Searching for all files in 'D:\JenkinsWorkspace\DEV_JOB' that match the pattern 'Dokumente/doxy.log'
      19:16:48 [Doxygen] -> found 1 file
      19:16:48 [Doxygen] Skipping post processing
      19:16:48 [Doxygen] No filter has been set, publishing all 0 issues
      19:16:48 [Doxygen] Repository miner is not configured, skipping repository mining
      19:16:48 [Doxygen] Reference build recorder is not configured
      19:16:48 [Doxygen] Obtaining reference build from same job (DEV_Job)
      19:16:48 [Doxygen] No valid reference build found that meets the criteria (NO_JOB_FAILURE - SUCCESSFUL_QUALITY_GATE)
      19:16:48 [Doxygen] All reported issues will be considered outstanding
      19:16:48 [Doxygen] Evaluating quality gates
      19:16:48 [Doxygen] -> PASSED - Total (severity low only): 0 - Quality QualityGate: 1
      19:16:48 [Doxygen] -> PASSED - Total (severity normal only): 0 - Quality QualityGate: 1
      19:16:48 [Doxygen] -> PASSED - Total (severity high only): 0 - Quality QualityGate: 1
      19:16:48 [Doxygen] -> PASSED - Total (errors only): 0 - Quality QualityGate: 1
      19:16:48 [Doxygen] -> All quality gates have been passed
      19:16:48 [Doxygen] Health report is disabled - skipping
      19:16:48 [Doxygen] Created analysis result for 0 issues (found 0 new issues, fixed 0 issues)
      19:16:48 [Doxygen] Failing build because analysis result contains errors
      19:16:48 [Doxygen] Attaching ResultAction with ID 'doxygen' to build 'DEV_JOB #8'.
      19:16:48 [Checks API] No suitable checks publisher found.
      19:16:48 Build step 'Record compiler warnings and static analysis results' changed build result to FAILURE
      

      The doxy.log file is empty an there fore a size of 0 bytes.

          [JENKINS-65547] Silently ignore empty files when parsing for warnings

          Tim Schlüter created issue -

          Ulli Hafner added a comment -

          Can you please elaborate? Also please add the console log part of my plugin.

          Ulli Hafner added a comment - Can you please elaborate? Also please add the console log part of my plugin.
          Tim Schlüter made changes -
          Description Original: If I have no warnings/infos/errors in my doxygen log the analysis result in an error. This should not happen as this is the target state. New: If I have no warnings/infos/errors in my doxygen log the analysis result in an error. This should not happen as this is the target state.

          Here the console log ouput of the plugin

          {code:java}
          19:16:48 [Doxygen] [-ERROR-] Skipping file 'Dokumente\doxy.log' because it's empty
          19:16:48 [Doxygen] Searching for all files in 'D:\JenkinsWorkspace\DEV_JOB' that match the pattern 'Dokumente/doxy.log'
          19:16:48 [Doxygen] -> found 1 file
          19:16:48 [Doxygen] Skipping post processing
          19:16:48 [Doxygen] No filter has been set, publishing all 0 issues
          19:16:48 [Doxygen] Repository miner is not configured, skipping repository mining
          19:16:48 [Doxygen] Reference build recorder is not configured
          19:16:48 [Doxygen] Obtaining reference build from same job (DEV_Job)
          19:16:48 [Doxygen] No valid reference build found that meets the criteria (NO_JOB_FAILURE - SUCCESSFUL_QUALITY_GATE)
          19:16:48 [Doxygen] All reported issues will be considered outstanding
          19:16:48 [Doxygen] Evaluating quality gates
          19:16:48 [Doxygen] -> PASSED - Total (severity low only): 0 - Quality QualityGate: 1
          19:16:48 [Doxygen] -> PASSED - Total (severity normal only): 0 - Quality QualityGate: 1
          19:16:48 [Doxygen] -> PASSED - Total (severity high only): 0 - Quality QualityGate: 1
          19:16:48 [Doxygen] -> PASSED - Total (errors only): 0 - Quality QualityGate: 1
          19:16:48 [Doxygen] -> All quality gates have been passed
          19:16:48 [Doxygen] Health report is disabled - skipping
          19:16:48 [Doxygen] Created analysis result for 0 issues (found 0 new issues, fixed 0 issues)
          19:16:48 [Doxygen] Failing build because analysis result contains errors
          19:16:48 [Doxygen] Attaching ResultAction with ID 'doxygen' to build 'DEV_JOB #8'.
          19:16:48 [Checks API] No suitable checks publisher found.
          19:16:48 Build step 'Record compiler warnings and static analysis results' changed build result to FAILURE
          {code}

          The doxy.log file is empty an there fore a size of 0 bytes.

          Tim Schlüter made changes -
          Attachment New: screenshot-1.png [ 54747 ]

          Tim Schlüter added a comment -

          This it how it looks in the job

          Tim Schlüter added a comment - This it how it looks in the job

          Ulli Hafner added a comment -

          I see. Empty files are considered as an error to find configuration errors quickly. And it seems that you activated the option failOnError. Leaving that value unchanged (or change it to failOnError: false should do the trick.

          Ulli Hafner added a comment - I see. Empty files are considered as an error to find configuration errors quickly. And it seems that you activated the option failOnError . Leaving that value unchanged (or change it to failOnError: false should do the trick.

          Tim Schlüter added a comment - - edited

          Why should this case be an error when this case is the target?
          I could deactivate this option but the 'Error message' in the is still there.

          Tim Schlüter added a comment - - edited Why should this case be an error when this case is the target? I could deactivate this option but the 'Error message' in the is still there.

          Ulli Hafner added a comment -

          Yes, because for the plugin it is an error if you feed it with an empty file. Filtering of uninteresting lines is done by the plugin itself.

          Ulli Hafner added a comment - Yes, because for the plugin it is an error if you feed it with an empty file. Filtering of uninteresting lines is done by the plugin itself.

          Tim Schlüter added a comment -

          But doxygen does not plot any unintersting files.

          Tim Schlüter added a comment - But doxygen does not plot any unintersting files.

          Ulli Hafner added a comment -

          How do you call Doxygen in your Pipeline?

          Ulli Hafner added a comment - How do you call Doxygen in your Pipeline?

            Unassigned Unassigned
            timsch Tim Schlüter
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: