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

msbuild parser does not recognize linker warnings

      The msbuild parser already recognizes linker errors but not warnings (see JENKINS-3582).

      LINK : fatal error LNK1181: cannot open input file 'TestLib.lib'

      is correctly detected (see regression test in MsBuildParserTest.java). Warnings like 

      LINK : warning LNK4217: symbol 'XYZ' defined in 'abc.obj' is imported by 'def.obj' in function 'FGH'
      LINK : warning LNK4286: symbol 'XYZ' defined in 'abc.obj' is imported by 'def.obj'

       are not recognized. The issues seems to be in the regexp

      (.*)\\s*:.*error\\s*(LNK[0-9]+):\\s*(.*)
      

      in file https://github.com/jenkinsci/analysis-model/blob/master/src/main/java/edu/hm/hafner/analysis/parser/MsBuildParser.java#L27 that only detects errors not warnings.

       

       

          [JENKINS-63580] msbuild parser does not recognize linker warnings

          Hello, drulli

          I have a strange problem with a regular expression. It can understand lines like
          [exec] 23>LINK : warning LNK1181: cannot open input file 'TestLib.lib'
          but the line
          LINK : warning LNK4217: symbol 'XYZ' defined in 'abc.obj' is imported by ' def.obj' in function 'FGH' is not capable.

          Empirically, I found out that the problem is in the "." sign inside '. A line like
          LINK : warning LNK4217: symbol 'X.YZ' defined in 'abc.obj' is imported by 'def.obj' in function 'F.GH'

          recognized correctly.
          This is strange, because the code in the expression itself should not take this into account.

           

          Build log and draft PR can be found here

          Ilya Pyatizbyantsev added a comment - Hello, drulli !  I have a strange problem with a regular expression. It can understand lines like [exec] 23>LINK : warning LNK1181: cannot open input file 'TestLib.lib' but the line LINK : warning LNK4217: symbol 'XYZ' defined in 'abc.obj' is imported by ' def.obj' in function 'FGH'  is not capable. Empirically, I found out that the problem is in the "." sign inside '. A line like LINK : warning LNK4217: symbol 'X.YZ' defined in 'abc.obj' is imported by 'def.obj' in function 'F.GH' recognized correctly. This is strange, because the code in the expression itself should not take this into account.   Build log and draft PR can be found here

            pyatizbyantsevia Ilya Pyatizbyantsev
            poehlsen Stephan Pöhlsen
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: