[JIRA] (JENKINS-57365) MsBuildParser reports warnings if the build project contains "info"

9 views
Skip to first unread message

stephan.senkbeil@sonoware.de (JIRA)

unread,
May 8, 2019, 3:07:04 AM5/8/19
to jenkinsc...@googlegroups.com
Stephan Senkbeil created an issue
 
Jenkins / Bug JENKINS-57365
MsBuildParser reports warnings if the build project contains "info"
Issue Type: Bug Bug
Assignee: Ulli Hafner
Components: analysis-model
Created: 2019-05-08 07:06
Environment: Jenkins 2.176
Analysis Model API Plug-in 5.0.0
Warnings Next Generation Plugin 5.0.0
Priority: Minor Minor
Reporter: Stephan Senkbeil

The warning analysis reports a false positive if e.g. the build project name contains the string "info".

For example, the line below is matched by the regexp parser:

311>------ Build started: Project: sysinfo, Configuration: Debug Win32 ------

 
This obviously leads to an error during the report generation:

[DEBUG] [-ERROR-] Can't resolve absolute paths for some files:
[DEBUG] [-ERROR-] - C:/jenkins/workspace/acecode-win/build/------ Build started: Project
[DEBUG] [-ERROR-] Can't create fingerprints for some files:
[DEBUG] [-ERROR-] - 'C:/jenkins/workspace/acecode-win/build/------ Build started: Project', IO exception has been thrown: java.nio.file.InvalidPathException: Illegal char <:> at index 59: C:/jenkins/workspace/acecode-win/build/------ Build started: Project

 

Add Comment Add Comment
 
This message was sent by Atlassian Jira (v7.11.2#711002-sha1:fdc329d)

ullrich.hafner@gmail.com (JIRA)

unread,
May 8, 2019, 8:29:02 AM5/8/19
to jenkinsc...@googlegroups.com
Ulli Hafner assigned an issue to Unassigned
Change By: Ulli Hafner
Labels: help-wanted newbie-friendly
Assignee: Ulli Hafner

stephan.senkbeil@sonoware.de (JIRA)

unread,
May 8, 2019, 9:09:02 AM5/8/19
to jenkinsc...@googlegroups.com
Stephan Senkbeil commented on Bug JENKINS-57365
 
Re: MsBuildParser reports warnings if the build project contains "info"

I don't know about the broader scope of the different versions of MsBuild and the corresponding outputs that have to be matched with the regexp, but I have a suggestions which fixes my issue. Obviously I cannot guarantee that this doesn't break anything else but looking at the examples in the unit test file msbuild.txt it could be valid.

New regexp pattern:

 

MS_BUILD_WARNING_PATTERN = "(?:^(?:.*)Command line warning ([A-Za-z0-9]+):\\s*(.*)\\s*\\[(.*)\\])|"
            + ANT_TASK + "(?:(?:\\s*(?:\\d+|\\d+:\\d+)>)?(?:(?:(?:(.*?)\\((\\d*)(?:,(\\d+))?[a-zA-Z]*?\\)|.*LINK)\\s*:|"
            + "(.*):)\\s*([A-z-_]*\\s(?:[Nn]ote|[Ii]nfo|[Ww]arning|(?:fatal\\s*)?[Ee]rror))[^A-Za-z0-9]\\s*:?\\s*([A-Za-z0-9\\-_]+)?"
            + "\\s*:\\s(?:\\s*([A-Za-z0-9.]+)\\s*:)?\\s*(.*?)(?: \\[([^\\]]*)[/\\\\][^\\]\\\\]+\\])?"
            + "|(.*)\\s*:.*error\\s*(LNK[0-9]+):\\s*(.*)))$";

I removed the "optional"-flag (question mark) for the whitespace before the note/info/warning/fatal error strings. In other words, the strings are now only matched if they have a whitespace right before them which seems to be valid for the test cases in the unit test file msbuild.txt.

 

 

This should probably be checked by someone more familiar with the various MsBuild outputs but I just wanted to contribute a bit and provide some guidance to solve the issue.

stephan.senkbeil@sonoware.de (JIRA)

unread,
May 14, 2019, 5:56:02 AM5/14/19
to jenkinsc...@googlegroups.com

stephan.senkbeil@sonoware.de (JIRA)

unread,
May 14, 2019, 6:00:03 AM5/14/19
to jenkinsc...@googlegroups.com
Stephan Senkbeil resolved as Fixed
Change By: Stephan Senkbeil
Status: Open Resolved
Resolution: Fixed
Released As: 5.0.2

peter.banfield@flowcal.com (JIRA)

unread,
Jun 6, 2019, 8:44:02 AM6/6/19
to jenkinsc...@googlegroups.com
Peter Banfield commented on Bug JENKINS-57365
 
Re: MsBuildParser reports warnings if the build project contains "info"

This change is now marking the following msbuild output where before it was not being marked.

 

unknown : info : PostSharp 5.0.45 [postsharp-net40-x86-native.exe release | .NET Framework 4.7] complete – 0 errors, 0 warnings, processed in 2272 ms

 

It is being reported as file: unknown:0, package: -, severity: Low, there is nothing reported in the category column.

 

Is this expected to be marked with this change?

Reply all
Reply to author
Forward
0 new messages