Search code examples
sonarqubesonarqube-web

SonarQube 6.0 Link to code for issues not working


We have an issue since our upgrade to SonarQube 6.0 that on the issues page the link icon or the right arrow icon no longer link to the code.

In this case clicking either link takes you to another (smaller) list of issues.

This is not the case for all issues, the only difference I can spot is that on the problem issues the filename and line number are not shown. checking in the database and in the issues table the 'line' column is also null.

We are using SonarQube 6.0 with C# plugin 5.3.2 - Analysis is triggered by TFS2015 Update 3

Many thanks in advance for any ideas/advice.


Solution

  • Following Teryk's response I manage fine tune my investigation. It turns out that it is cased by the MSBUILD output which does not include a filename or line for certain CA warning is Microsoft.Design and Microsoft.Naming, e.g. CA1024, CA1040, CA1704, CA1716, thus:

    3>MSBUILD : warning CA1040: Microsoft.Design : Define a custom attribute to replace 'ITierRepository'.
    

    When this happens the issue is recorded against the solution but obviously cannot be assign to a specific file and the line not identified.

    Having found that I was quick able to find the article which discusses the same issue:

    https://groups.google.com/d/topic/sonarqube/UDIIjWbCGjs

    It is caused by the fact that FxCop is not able find source for the issue as described here:

    https://blogs.msdn.microsoft.com/codeanalysis/2007/05/12/faq-why-is-file-and-line-information-available-for-some-warnings-in-fxcop-but-not-for-others/

    It apparently relates to changes to FxCop reporting that were introduced in v5.2 of the C# plugin which was also deployed at the same time as upgrading to SQ 6.0