Issue Type: Bug Bug
Affects Versions: current
Assignee: Ulli Hafner
Attachments: console log.txt, stack trace.txt
Components: warnings
Created: 27/Mar/14 2:42 PM
Description:

Warnings Plugin set to "Scan console log"
Parser set to MSBuild

Warnings Plugin correctly identifies the warning and shows its summary in the "MSBuild Warnings" page.
However, when I click on the link to show the file containing the specific warning, I get a stack trace from java.io.FileInputStream.open (attached).

Additional info:
I tried this with "Resolve relative paths" both checked and unchecked. It did not seem to make any difference.
I also tried using MSBuild both with and without the "/m" command-line option for building multiple projects in parallel. This option changes the console log format by appending the parallel build number to all lines of text. The Warnings Plugin was not affected by either setting of /m.

I think the problem is caused by MSBuild's output format which is:
Filename(line,column) : warning <number>: description [full path to project file]

I think the solution is to get the directory from project file and then append the relative filename of the file containing the warning. For example:
PbuAfg.cs(90,9): warning CS0168: The variable 'warnme' is declared but never used [C:\Program Files (x86)\Jenkins\workspace\gurb\Platforms\Afg\PbuAfg\PbuAfg.csproj]

The file containing the warning is: PbuAfg.cs
The project file is: C:\Program Files (x86)\Jenkins\workspace\gurb\Platforms\Afg\PbuAfg\PbuAfg.csproj

Get the directory part of the project: C:\Program Files (x86)\Jenkins\workspace\gurb\Platforms\Afg\PbuAfg\
Append the filename: C:\Program Files (x86)\Jenkins\workspace\gurb\Platforms\Afg\PbuAfg\PbuAfg.cs

This yields the full path to the file.

Environment: Windows 7 x64, US English
MSBuild 12.0.30110.0
Single Jenkins server running on this machine. No slaves involved.
Project: Jenkins
Labels: warnings
Priority: Major Major
Reporter: Bob Tracy
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators.
For more information on JIRA, see: http://www.atlassian.com/software/jira

--
You received this message because you are subscribed to the Google Groups "Jenkins Issues" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to