从命令行运行2.0.24版的MSBuild扫描程序会产生以下错误。
同样的分析在2.0版本中也是成功的,文档没有将这个键描述为强制键或扩展键。
异常由扫描程序抛出,强制参数在命令行上传递,包括版本、键和名称。
项目是使用LTS14.0和SonarQube版本5.6构建的,LTS5.1版本的C#插件使用。版本表说明此版本的MSBuild扫描仪支持4.5或更高版本。没有安装VB插件,因为没有包含VB代码的项目。
[1] - Unhandled Exception: System.ArgumentException: key doesn't exist: sonaranalyzer-cs.analyzerId
[2] - at SonarQube.TeamBuild.PreProcessor.Roslyn.Model.RoslynRuleSetGenerator.mandatoryPropertyValue(String propertyKey)
[3] - at SonarQube.TeamBuild.PreProcessor.Roslyn.Model.RoslynRuleSetGenerator.generate(IEnumerable 1 activeRules, IEnumerable 1 inactiveRules, String language)
[4] - at SonarQube.TeamBuild.PreProcessor.Roslyn.RoslynAnalyzerProvider.ConfigureAnalyzer(String language, IEnumerable 1 activeRules, IEnumerable 1 inactiveRules)
[5]
- at SonarQube.TeamBuild.PreProcessor.Roslyn.RoslynAnalyzerProvider.SetupAnalyzer (TeamBuildSettings settings, IDictionary 2 serverSettings, IEnumerable 1 activeRules, IEnumerable 1 inactiveRules, String language)
[6] - at SonarQube.TeamBuild.PreProcessor.TeamBuildPreProcessor.FetchArgumentsAndRulesets(ISonarQubeServer server, ProcessedArgs args, TeamBuildSettings settings, IDictionary 2& serverSettings, List 1& analyzersSettings)
[7] - at SonarQube.TeamBuild.PreProcessor.TeamBuildPreProcessor.DoExecute(ProcessedArgs args)
[8] - at SonarQube.TeamBuild.PreProcessor.TeamBuildPreProcessor.Execute(String[] args)
[9] - at SonarQube.Bootstrapper.BootstrapperClass.PreProcess()
[10] - at SonarQube.Bootstrapper.BootstrapperClass.Execute()
[11] - at SonarQube.Bootstrapper.Program.Main(String[] args)
[12] - at SonarQube.Old.Bootstrapper.Program.Main(String[] args)非常感谢您的任何建议。
发布于 2016-12-21 21:40:18
实际上,我想我可能有答案了。我认为问题在于他们在最新的版本中添加了这个新的声音分析器-cs.analyzerId密钥。如果我是对的,那么您和我一样,正在运行旧版本的sonarqube服务器,但是您下载了最新版本的扫描程序。因此,旧版本的服务器不发送密钥,而新版本的扫描程序要求将其作为强制服务器设置。
当我切换到使用服务器附带的扫描仪版本时,一切都像预期的那样工作。我相信我也可以升级我们的服务器,但这并不在当时的路线图上。
https://stackoverflow.com/questions/40548769
复制相似问题