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

Silently ignore empty files when parsing for warnings

    XMLWordPrintable

Details

    Description

      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.

      Attachments

        Issue Links

          Activity

            drulli Ulli Hafner added a comment -

            I'm not sure if it makes sense to remove the check at all or if we need a customization. For some tools it definitely is an error if they are called with an empty file.

            drulli Ulli Hafner added a comment - I'm not sure if it makes sense to remove the check at all or if we need a customization. For some tools it definitely is an error if they are called with an empty file.
            timsch Tim Schlüter added a comment -

            If it depends on the tools it should be automatically considered when I choose doxygen a tool or at least a tool dependend selectable option. For now I push the doxygen version into my log file to ensure that it will never be empty.

            timsch Tim Schlüter added a comment - If it depends on the tools it should be automatically considered when I choose doxygen a tool or at least a tool dependend selectable option. For now I push the doxygen version into my log file to ensure that it will never be empty.
            drulli Ulli Hafner added a comment -

            Well, most users extract doxygen warnings from the console log. Having here an empty input would clearly indicate an error. But it makes sense to have a overridable default.

            drulli Ulli Hafner added a comment - Well, most users extract doxygen warnings from the console log. Having here an empty input would clearly indicate an error. But it makes sense to have a overridable default.
            timsch Tim Schlüter added a comment -

            In my jobs I use not just doxygen an therefor the log is full of stuff. This rise the risk of misinterpreting 'warnings' from other tools.

            timsch Tim Schlüter added a comment - In my jobs I use not just doxygen an therefor the log is full of stuff. This rise the risk of misinterpreting 'warnings' from other tools.
            drulli Ulli Hafner added a comment -

            Yes, using a file is always better. If you are interested, it might be helpful for others if you can provide a small PR for https://github.com/jenkinsci/analysis-model/blob/master/src/main/java/edu/hm/hafner/analysis/registry/DoxygenDescriptor.java that describes shortly how you did invoke Doxygen. Example: https://github.com/jenkinsci/analysis-model/blob/master/src/main/java/edu/hm/hafner/analysis/registry/CargoDescriptor.java#L26

            drulli Ulli Hafner added a comment - Yes, using a file is always better. If you are interested, it might be helpful for others if you can provide a small PR for https://github.com/jenkinsci/analysis-model/blob/master/src/main/java/edu/hm/hafner/analysis/registry/DoxygenDescriptor.java that describes shortly how you did invoke Doxygen. Example: https://github.com/jenkinsci/analysis-model/blob/master/src/main/java/edu/hm/hafner/analysis/registry/CargoDescriptor.java#L26

            People

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

              Dates

                Created:
                Updated: