RFF Release SonarC# 6.7

118 views
Skip to first unread message

Michal Barczyk

unread,
Nov 24, 2017, 10:34:55 AM11/24/17
to sona...@googlegroups.com

Hello everyone,

 

We would like to release SonarC# and are waiting for your feedback.

This version re-enables analysis on non-Windows OSes and improves few rules (largely around tests).

You can find the product release notes here:
https://github.com/SonarSource/sonar-csharp/milestone/14?closed=1

 

Here is the download link:
https://github.com/SonarSource/sonar-csharp/releases/tag/6.7-RC1

We appreciate all help with testing. Please provide your feedback before 1st December 2017.

Cheers,

.Net Team

Raphaël DUCOM

unread,
Nov 27, 2017, 4:10:21 PM11/27/17
to Michal Barczyk, SonarQube
I have tried the v7 with both msbuild scanner 3.x and 4.x, it result in a crash on sonar start step (on sonarqube 6.7 LTS) :

sonar-scanner-msbuild-3.0.0.629 :
D:\workspace\rc34f193cd>C:\d\sonar-scanner-msbuild-3.0.0.629\SonarQube.Scanner.MSBuild.exe begin /d:"sonar.login=****" /d:"sonar.analysis.mode=publish" /k:"iXX" /d:"sonar.host.url=http://sonar.XX.fr"  /d:sonar.language=cs /d:sonar.sources=Application/,Data/,Domain/,iXX/,Infra/,Web/ /d:sonar.exclusions=**/Static/**/*,**/SPA/**/*  /d:"sonar.github.repository=XXSA/iXX" /d:sonar.github.disableInlineComments=false /d:sonar.cs.opencover.reportsPaths="opencoverCoverage.xml" /d:"sonar.github.oauth=****"
SonarQube Scanner for MSBuild 3.0
Default properties file was found at C:\d\sonar-scanner-msbuild-3.0.0.629\SonarQube.Analysis.xml
Loading analysis properties from C:\d\sonar-scanner-msbuild-3.0.0.629\SonarQube.Analysis.xml
Pre-processing started.
Preparing working directories...
22:02:39.905  Updating build integration targets...
22:02:39.917  Fetching analysis configuration settings...

Unhandled Exception: System.ArgumentNullException: Value cannot be null.
Parameter name: source
   at System.Linq.Enumerable.Single[TSource](IEnumerable`1 source)
   at SonarQube.TeamBuild.PreProcessor.SonarWebService.<>c__DisplayClass8_2.<GetActiveRules>b__1(JObject r)
   at System.Linq.Enumerable.WhereSelectEnumerableIterator`2.MoveNext()
   at System.Collections.Generic.List`1.InsertRange(Int32 index, IEnumerable`1 collection)
   at SonarQube.TeamBuild.PreProcessor.SonarWebService.GetActiveRules(String qprofile)
   at SonarQube.TeamBuild.PreProcessor.TeamBuildPreProcessor.FetchArgumentsAndRulesets(ISonarQubeServer server, ProcessedArgs args, TeamBuildSettings settings, IDictionary`2& serverSettings, List`1& analyzersSettings)
   at SonarQube.TeamBuild.PreProcessor.TeamBuildPreProcessor.DoExecute(ProcessedArgs localSettings)
   at SonarQube.TeamBuild.PreProcessor.TeamBuildPreProcessor.Execute(String[] args)
   at SonarQube.Bootstrapper.BootstrapperClass.PreProcess()
   at SonarQube.Bootstrapper.BootstrapperClass.Execute()
   at SonarQube.Bootstrapper.Program.Execute(String[] args, ILogger logger)
   at SonarQube.Bootstrapper.Program.Main(String[] args)


sonar-scanner-msbuild-4.0.0.731 :
D:\workspace\PR-5517c8815354>C:\d\sonar-scanner-msbuild-4.0.0.731\SonarQube.Scanner.MSBuild.exe begin /d:"sonar.login=****" /d:"sonar.analysis.mode=preview" /k:"iXX" /d:"sonar.host.url=http://sonar.XX.fr"  /d:sonar.language=cs /d:sonar.sources=Application/,Data/,Domain/,iXX/,Infra/,Web/ /d:sonar.exclusions=**/Static/**/*,**/SPA/**/*  /d:"sonar.github.repository=XXSA/iXX" /d:sonar.github.disableInlineComments=false /d:"sonar.github.pullRequest=5517" /d:"sonar.github.oauth=****"
SonarQube Scanner for MSBuild 4.0
Default properties file was found at C:\d\sonar-scanner-msbuild-4.0.0.731\SonarQube.Analysis.xml
Loading analysis properties from C:\d\sonar-scanner-msbuild-4.0.0.731\SonarQube.Analysis.xml
Pre-processing started.
Preparing working directories...
21:58:08.533  Updating build integration targets...
21:58:08.542  Fetching analysis configuration settings...

Exception non g�r�e�: System.ArgumentNullException: La valeur ne peut pas �tre null.
Nom du param�tre�: source
   � System.Linq.Enumerable.Single[TSource](IEnumerable`1 source)
   � SonarQube.TeamBuild.PreProcessor.SonarWebService.<>c__DisplayClass8_2.<GetActiveRules>b__1(JObject r)
   � System.Linq.Enumerable.WhereSelectEnumerableIterator`2.MoveNext()
   � System.Collections.Generic.List`1.InsertRange(Int32 index, IEnumerable`1 collection)
   � SonarQube.TeamBuild.PreProcessor.SonarWebService.GetActiveRules(String qprofile)
   � SonarQube.TeamBuild.PreProcessor.TeamBuildPreProcessor.FetchArgumentsAndRulesets(ISonarQubeServer server, ProcessedArgs args, TeamBuildSettings settings, IDictionary`2& serverSettings, List`1& analyzersSettings)
   � SonarQube.TeamBuild.PreProcessor.TeamBuildPreProcessor.DoExecute(ProcessedArgs localSettings)
   � SonarQube.TeamBuild.PreProcessor.TeamBuildPreProcessor.Execute(String[] args)
   � SonarQube.Bootstrapper.BootstrapperClass.PreProcess()
   � SonarQube.Bootstrapper.BootstrapperClass.Execute()
   � SonarQube.Bootstrapper.Program.Execute(String[] args, ILogger logger)
   � SonarQube.Bootstrapper.Program.Main(String[] args)


--
You received this message because you are subscribed to the Google Groups "SonarQube" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sonarqube+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/sonarqube/CAPSY08iFHP%2BsO6m1p88jG6kXaJXvLNWHq1Z1oev3QHnh8guJxw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Duarte Meneses

unread,
Nov 28, 2017, 5:38:11 AM11/28/17
to SonarQube
Hi,

It seems like a response of a webservice is inconsistent, causing the Scanner to fail. It could be caused by a corrupted Elasticsearch index.
Would it be possible for you to try to stop the server, remove the folder `data/es` and start it again? The index will be generated again on startup.
To unsubscribe from this group and stop receiving emails from it, send an email to sonarqube+...@googlegroups.com.

duarte...@gmail.com

unread,
Nov 28, 2017, 7:54:21 AM11/28/17
to SonarQube
For us to debug the problem, we would need the response of the webservice that I mentioned.

To get it, you can follow this steps:
  • Enable verbose logs in your build, by adding the parameter '/d:sonar.vebose=true' to the first command (SonarQube.Scanner.MSBuild.exe begin);
  • Check what webservice is called just before the error. It should appear in the verbose logs, and it should look like this: https://[SONARQUBE_URL]/api/rules/search?f=repo,name,severity,lang,internalKey,templateKey,params,actives&ps=500&activation=true&qprofile=[QUALITY_PROFILE_KEY]&p=[n]
  • Send us the response of the webservice (you can open it in the browser)

Thanks.
Reply all
Reply to author
Forward
0 new messages