1

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.

1 Answers1

2

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

  • And FYI Code Analysis (aka FXCop) is about (if not already done) to be officially deprecated by Microsoft and replaced by a bunch of Roslyn analyzers packages, see https://github.com/dotnet/roslyn-analyzers/blob/master/docs/FxCopPort/Porting%20FxCop%20Rules%20to%20Roslyn.md. SonarQube, SonarLint and the Scanner for MSBuild has been designed from scratch to perfectly support Roslyn analyzers but indeed the integration of FXCop suffers from few limitations and you've reached one of them. – Freddy - SonarSource Team Sep 22 '16 at 16:40
  • Thanks for the clarification Freddy – castleofbones Sep 23 '16 at 12:54