Sonarqube C# scanner exception: quot;java.lang.IllegalArgumentException: is not a valid line offset for pointerquot;(Sonarqube C# 扫描器异常:“java.lang.IllegalArgumentException: is not a valid line offset for pointer)
问题描述
有人知道这里发生了什么吗?
Does anyone know what's going on here?
在windows服务器上使用Sonarqube v5.6,c#scanner v5.5.0.479
Using Sonarqube v5.6 on a windows server, c# scanner v5.5.0.479
似乎在多个文件中发现了这一点,而且并不总是相同的文件,这是最令人担忧的.
Seems to pick this up in multiple files, and not always the same files, which is the most concerning.
有人有什么想法吗?
16:46:03 INFO: Importing analysis results from E:JenkinsworkspaceJob Build-UnitTest (PullRequests).sonaroutput-cs
16:46:05 INFO: ------------------------------------------------------------------------
16:46:05 INFO: EXECUTION FAILURE
16:46:05 INFO: ------------------------------------------------------------------------
16:46:05 INFO: Total time: 3:36.304s
16:46:05 INFO: Final Memory: 53M/700M
16:46:05 INFO: ------------------------------------------------------------------------
16:46:05 ERROR: Error during SonarQube Scanner execution
16:46:05 java.lang.IllegalArgumentException: 30 is not a valid line offset for pointer. File [moduleKey=JOB:develop, relative=DataStructures/Interval.cs, basedir=E:JenkinsworkspaceJob Build-UnitTest (PullRequests)] has 1 character(s) at line 132
16:46:05 at org.sonar.api.internal.google.common.base.Preconditions.checkArgument(Preconditions.java:148)
16:46:05 at org.sonar.api.batch.fs.internal.DefaultInputFile.checkValid(DefaultInputFile.java:218)
16:46:05 at org.sonar.api.batch.fs.internal.DefaultInputFile.newPointer(DefaultInputFile.java:209)
16:46:05 at org.sonar.api.batch.fs.internal.DefaultInputFile.newRange(DefaultInputFile.java:239)
16:46:05 at org.sonarsource.dotnet.shared.plugins.SensorContextUtils.toTextRange(SensorContextUtils.java:41)
16:46:05 at org.sonarsource.dotnet.shared.plugins.protobuf.IssuesImporter.importMessage(IssuesImporter.java:54)
16:46:05 at org.sonarsource.dotnet.shared.plugins.protobuf.IssuesImporter.importMessage(IssuesImporter.java:31)
16:46:05 at org.sonarsource.dotnet.shared.plugins.protobuf.AbstractProtobufImporter.accept(AbstractProtobufImporter.java:49)
16:46:05 at org.sonarsource.dotnet.shared.plugins.AbstractSensor.parseProtobuf(AbstractSensor.java:80)
16:46:05 at org.sonarsource.dotnet.shared.plugins.AbstractSensor.importResults(AbstractSensor.java:70)
16:46:05 at org.sonar.plugins.csharp.CSharpSensor.executeInternal(CSharpSensor.java:114)
16:46:05 at org.sonar.plugins.csharp.CSharpSensor.execute(CSharpSensor.java:85)
16:46:05 at org.sonar.batch.sensor.SensorWrapper.analyse(SensorWrapper.java:57)
16:46:05 at org.sonar.batch.phases.SensorsExecutor.executeSensor(SensorsExecutor.java:58)
16:46:05 at org.sonar.batch.phases.SensorsExecutor.execute(SensorsExecutor.java:50)
16:46:05 at org.sonar.batch.phases.AbstractPhaseExecutor.execute(AbstractPhaseExecutor.java:83)
16:46:05 at org.sonar.batch.scan.ModuleScanContainer.doAfterStart(ModuleScanContainer.java:192)
16:46:05 at org.sonar.core.platform.ComponentContainer.startComponents(ComponentContainer.java:142)
16:46:05 at org.sonar.core.platform.ComponentContainer.execute(ComponentContainer.java:127)
16:46:05 at org.sonar.batch.scan.ProjectScanContainer.scan(ProjectScanContainer.java:241)
16:46:05 at org.sonar.batch.scan.ProjectScanContainer.scanRecursively(ProjectScanContainer.java:236)
16:46:05 at org.sonar.batch.scan.ProjectScanContainer.doAfterStart(ProjectScanContainer.java:226)
16:46:05 at org.sonar.core.platform.ComponentContainer.startComponents(ComponentContainer.java:142)
16:46:05 at org.sonar.core.platform.ComponentContainer.execute(ComponentContainer.java:127)
16:46:05 at org.sonar.batch.task.ScanTask.execute(ScanTask.java:47)
16:46:05 at org.sonar.batch.task.TaskContainer.doAfterStart(TaskContainer.java:86)
16:46:05 at org.sonar.core.platform.ComponentContainer.startComponents(ComponentContainer.java:142)
16:46:05 at org.sonar.core.platform.ComponentContainer.execute(ComponentContainer.java:127)
16:46:05 at org.sonar.batch.bootstrap.GlobalContainer.executeTask(GlobalContainer.java:106)
16:46:05 at org.sonar.batch.bootstrapper.Batch.executeTask(Batch.java:119)
16:46:05 at org.sonarsource.scanner.api.internal.batch.BatchIsolatedLauncher.execute(BatchIsolatedLauncher.java:62)
16:46:05 at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
16:46:05 at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
16:46:05 at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
16:46:05 at java.lang.reflect.Method.invoke(Method.java:498)
16:46:05 at org.sonarsource.scanner.api.internal.IsolatedLauncherProxy.invoke(IsolatedLauncherProxy.java:60)
16:46:05 at com.sun.proxy.$Proxy0.execute(Unknown Source)
16:46:05 at org.sonarsource.scanner.api.EmbeddedScanner.doExecute(EmbeddedScanner.java:240)
16:46:05 at org.sonarsource.scanner.api.EmbeddedScanner.runAnalysis(EmbeddedScanner.java:151)
16:46:05 at org.sonarsource.scanner.cli.Main.runAnalysis(Main.java:110)
16:46:05 at org.sonarsource.scanner.cli.Main.execute(Main.java:72)
16:46:05 at org.sonarsource.scanner.cli.Main.main(Main.java:60)
16:46:05 ERROR:
16:46:05 ERROR: Re-run SonarQube Scanner using the -X switch to enable full debug logging.
16:46:05 ERROR: SonarQube scanner exited with non-zero code: 1
推荐答案
这是 C# 插件中的一个错误.修复即将到来.在此之前,您可以将文件的编码更改为 UTF-8.
This is a bug in the C# plugin. The fix is coming. Until then you can change the encoding of your files to UTF-8.
这篇关于Sonarqube C# 扫描器异常:“java.lang.IllegalArgumentException: is not a valid line offset for pointer"的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:Sonarqube C# 扫描器异常:“java.lang.IllegalArgumentException: is not a valid line offset for pointer"
基础教程推荐
- 如何在 IDE 中获取 Xamarin Studio C# 输出? 2022-01-01
- 有没有办法忽略 2GB 文件上传的 maxRequestLength 限制? 2022-01-01
- 将 XML 转换为通用列表 2022-01-01
- c# Math.Sqrt 实现 2022-01-01
- 如何激活MC67中的红灯 2022-01-01
- rabbitmq 的 REST API 2022-01-01
- 为什么Flurl.Http DownloadFileAsync/Http客户端GetAsync需要 2022-09-30
- SSE 浮点算术是否可重现? 2022-01-01
- MS Visual Studio .NET 的替代品 2022-01-01
- 将 Office 安装到 Windows 容器 (servercore:ltsc2019) 失败,错误代码为 17002 2022-01-01