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

Warning-ng plugin doesn't capture 'Hint' output from msBuild

    XMLWordPrintable

    Details

    • Similar Issues:

      Description

      When building Delphi projects with msBuild, the output can include Warnings and Hints. Currently Hints are ignored. It would be very useful if they were included and any increase in the number of hints treated as a fail in qualityGate.

      Additionally the parser misidentifies the affected files. Sample console log:

      Embarcadero Delphi for Win32 compiler version 21.0
       Copyright (c) 1983,2009 Embarcadero Technologies, Inc.
      C:\Program Files (x86)\Embarcadero\RAD Studio\7.0\Bin\CodeGear.Delphi.Targets : warning : C:\Delphi Projects\DCU 2010\indy10\Lib\System\IdWship6.pas(469) Warning: W1000 Symbol 'GIdIPv6FuncsAvailable' is deprecated
      C:\Program Files (x86)\Embarcadero\RAD Studio\7.0\Bin\CodeGear.Delphi.Targets : warning : C:\Delphi Projects\DCU 2010\indy10\Lib\System\IdWship6.pas(1221) Warning: W1000 Symbol 'GIdIPv6FuncsAvailable' is deprecated
      C:\Delphi Projects\DCU 2010\Externals\Lib\Delphi\IBSQL.pas(205) hint: H2219 Private symbol 'GetCodePage' declared but never used
      C:\Program Files (x86)\Embarcadero\RAD Studio\7.0\Bin\CodeGear.Delphi.Targets : warning : C:\Program Files (x86)\Jenkins\workspace\POS_Manager_develop\Externals\Lib\Common\FBHStrUtils.pas(349) Warning: W1024 Combining signed and unsigned types - widened both operands
       269261 lines, 2.61 seconds, 2496188 bytes code, 595788 bytes data.
       Done building target "CoreCompile" in project "POSManagerTests.dproj".
      Done building project "POSManagerTests.dproj".
      Build succeeded.
       C:\Program Files (x86)\Embarcadero\RAD Studio\7.0\Bin\CodeGear.Delphi.Targets : warning : C:\Delphi Projects\DCU 2010\indy10\Lib\System\IdWship6.pas(469) Warning: W1000 Symbol 'GIdIPv6FuncsAvailable' is deprecated
       C:\Program Files (x86)\Embarcadero\RAD Studio\7.0\Bin\CodeGear.Delphi.Targets : warning : C:\Delphi Projects\DCU 2010\indy10\Lib\System\IdWship6.pas(1221) Warning: W1000 Symbol 'GIdIPv6FuncsAvailable' is deprecated
       C:\Program Files (x86)\Embarcadero\RAD Studio\7.0\Bin\CodeGear.Delphi.Targets : warning : C:\Program Files (x86)\Jenkins\workspace\POS_Manager_develop\Externals\Lib\Common\FBHStrUtils.pas(349) Warning: W1024 Combining signed and unsigned types - widened both operands
       3 Warning(s)
       0 Error(s)
      

      warnings-ng reports the affected file being C:\Program Files (x86)\Embarcadero\RAD Studio\7.0\Bin\CodeGear.Delphi.Targets, rather than C:\Delphi Projects\DCU 2010\indy10\Lib\System\IdWship6.pas  

      I suspect it would report the hint correctly, but the ignores it entirely (I imagine because the parser isn't looking for "hints" in the output of msbuild.

       

      Example line with hint

      C:\Delphi Projects\DCU 2010\Externals\Lib\Delphi\IBSQL.pas(205) hint: H2219 Private symbol 'GetCodePage' declared but never used

       

       

        Attachments

          Activity

          Hide
          drulli Ulli Hafner added a comment -

          Can you please add one whole console log line with an example that can be used in a test?

          Show
          drulli Ulli Hafner added a comment - Can you please add one whole console log line with an example that can be used in a test?
          Hide
          martinjmoore Martin Moore added a comment -

          Thanks, line added above.

          Show
          martinjmoore Martin Moore added a comment - Thanks, line added above.
          Hide
          alexjmace Alex Mace added a comment -

          Attached example file with the two problem lines.

          Show
          alexjmace Alex Mace added a comment - Attached example file with the two problem lines.
          Hide
          drulli Ulli Hafner added a comment -

          I wonder if it would make sense to write a new parser here, as the first part of such a log message actually can be totally ignored.

          Show
          drulli Ulli Hafner added a comment - I wonder if it would make sense to write a new parser here, as the first part of such a log message actually can be totally ignored.
          Hide
          alexjmace Alex Mace added a comment -

          For the warnings, yes, the hint I think is in the correct format that the msbuild parser can read (aside from being a Hint), but you know what's better than me.

          Show
          alexjmace Alex Mace added a comment - For the warnings, yes, the hint I think is in the correct format that the msbuild parser can read (aside from being a Hint), but you know what's better than me.

            People

            • Assignee:
              Unassigned
              Reporter:
              martinjmoore Martin Moore
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated: