The sonarcloud analysis fails with an error
java.lang.IllegalArgumentException: 4 is not a valid line offset for pointer. File xyz.go has 0 character(s) at line 30.
Line 30 is an empty line between functions.
Currently only happens in one PR.
Language Go
Github
Azure pipelines
SonarCloudAnalyze 2.3.2
12:24:33.353 ERROR Error during SonarScanner Engine execution
java.lang.IllegalArgumentException: 4 is not a valid line offset for pointer. File xyz.go has 0 character(s) at line 30
at org.sonar.api.utils.Preconditions.checkArgument(Preconditions.java:43)
at org.sonar.api.batch.fs.internal.DefaultInputFile.checkValid(DefaultInputFile.java:338)
at org.sonar.api.batch.fs.internal.DefaultInputFile.newPointer(DefaultInputFile.java:271)
at org.sonar.api.batch.fs.internal.DefaultInputFile.newRange(DefaultInputFile.java:287)
at org.sonarsource.slang.plugin.InputFileContext.textRange(InputFileContext.java:55)
at org.sonarsource.slang.plugin.CpdVisitor.reusePreviousResults(CpdVisitor.java:92)
at org.sonarsource.slang.plugin.SlangSensor.reusePreviousResults(SlangSensor.java:189)
at org.sonarsource.slang.plugin.SlangSensor.lambda$analyseFile$2(SlangSensor.java:141)
at java.base/java.util.stream.Collectors.lambda$uniqKeysMapAccumulator$1(Unknown Source)
at java.base/java.util.stream.ReduceOps$3ReducingSink.accept(Unknown Source)
at java.base/java.util.stream.ReferencePipeline$3$1.accept(Unknown Source)
at java.base/java.util.stream.ReferencePipeline$2$1.accept(Unknown Source)
at java.base/java.util.Spliterators$ArraySpliterator.forEachRemaining(Unknown Source)
at java.base/java.util.stream.AbstractPipeline.copyInto(Unknown Source)
at java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(Unknown Source)
at java.base/java.util.stream.ReduceOps$ReduceOp.evaluateSequential(Unknown Source)
at java.base/java.util.stream.AbstractPipeline.evaluate(Unknown Source)
at java.base/java.util.stream.ReferencePipeline.collect(Unknown Source)
at org.sonarsource.slang.plugin.SlangSensor.analyseFile(SlangSensor.java:141)
at org.sonarsource.slang.plugin.SlangSensor.analyseFiles(SlangSensor.java:117)
at org.sonarsource.slang.plugin.SlangSensor.execute(SlangSensor.java:231)
at org.sonar.scanner.sensor.AbstractSensorWrapper.analyse(AbstractSensorWrapper.java:63)
at org.sonar.scanner.sensor.ModuleSensorsExecutor.execute(ModuleSensorsExecutor.java:75)
at org.sonar.scanner.sensor.ModuleSensorsExecutor.lambda$execute$1(ModuleSensorsExecutor.java:48)
at org.sonar.scanner.sensor.ModuleSensorsExecutor.withModuleStrategy(ModuleSensorsExecutor.java:66)
at org.sonar.scanner.sensor.ModuleSensorsExecutor.execute(ModuleSensorsExecutor.java:48)
at org.sonar.scanner.scan.ModuleScanContainer.doAfterStart(ModuleScanContainer.java:64)
at org.sonar.core.platform.ComponentContainer.startComponents(ComponentContainer.java:123)
at org.sonar.core.platform.ComponentContainer.execute(ComponentContainer.java:109)
at org.sonar.scanner.scan.ProjectScanContainer.scan(ProjectScanContainer.java:192)
at org.sonar.scanner.scan.ProjectScanContainer.scanRecursively(ProjectScanContainer.java:188)
at org.sonar.scanner.scan.ProjectScanContainer.doAfterStart(ProjectScanContainer.java:159)
at org.sonar.core.platform.ComponentContainer.startComponents(ComponentContainer.java:123)
at org.sonar.core.platform.ComponentContainer.execute(ComponentContainer.java:109)
at org.sonar.scanner.bootstrap.ScannerContainer.doAfterStart(ScannerContainer.java:416)
at org.sonar.core.platform.ComponentContainer.startComponents(ComponentContainer.java:123)
at org.sonar.core.platform.ComponentContainer.execute(ComponentContainer.java:109)
at org.sonar.scanner.bootstrap.GlobalContainer.doAfterStart(GlobalContainer.java:128)
at org.sonar.core.platform.ComponentContainer.startComponents(ComponentContainer.java:123)
at org.sonar.core.platform.ComponentContainer.execute(ComponentContainer.java:109)
at org.sonar.scanner.bootstrap.ScannerMain.runScannerEngine(ScannerMain.java:135)
at org.sonar.scanner.bootstrap.ScannerMain.run(ScannerMain.java:52)
at org.sonar.scanner.bootstrap.ScannerMain.main(ScannerMain.java:38)
##[warning]Can't find loc string for key: LIB_ProcessExitCode
##[warning]Error while executing SonarCloud:Analyze task: LIB_ProcessExitCode /home/vsts/work/_tasks/SonarCloudAnalyze______/2.3.2/sonar-scanner/bin/sonar-scanner 3
##[error]LIB_ProcessExitCode /home/vsts/work/_tasks/SonarCloudAnalyze______/2.3.2/sonar-scanner/bin/sonar-scanner 3
2024-09-19T12:24:14.5431874Z ##[section]Starting: SonarCloudAnalyze
2024-09-19T12:24:14.5441087Z ==============================================================================
2024-09-19T12:24:14.5441319Z Task : Run Code Analysis
2024-09-19T12:24:14.5441419Z Description : Run scanner and upload the results to the SonarCloud server.
2024-09-19T12:24:14.5441751Z Version : 2.3.2
2024-09-19T12:24:14.5441842Z Author : sonarsource
2024-09-19T12:24:14.5441999Z Help : This task is not needed for Maven and Gradle projects since the scanner should be run as part of the build.
[More Information](https://docs.sonarcloud.io/advanced-setup/ci-based-analysis/sonarcloud-extension-for-azure-devops/)
2024-09-19T12:24:14.5442363Z ==============================================================================
2024-09-19T12:24:14.7723964Z [command]/home/vsts/work/_tasks/SonarCloudAnalyze_____xyz___/2.3.2/sonar-scanner/bin/sonar-scanner
2024-09-19T12:24:15.2591407Z 12:24:15.254 INFO Scanner configuration file: /home/vsts/work/_tasks/SonarCloudAnalyze_____xyz___/2.3.2/sonar-scanner/conf/sonar-scanner.properties
2024-09-19T12:24:15.2604896Z 12:24:15.260 INFO Project root configuration file: NONE
2024-09-19T12:24:15.2823556Z 12:24:15.278 INFO SonarScanner CLI 6.1.0.4477
2024-09-19T12:24:15.2824085Z 12:24:15.279 INFO Java 17.0.12 Eclipse Adoptium (64-bit)
2024-09-19T12:24:15.2824450Z 12:24:15.280 INFO Linux 6.8.0-1014-azure amd64
2024-09-19T12:24:15.3239155Z 12:24:15.323 INFO User cache: /home/vsts/.sonar/cache
2024-09-19T12:24:16.0061119Z 12:24:16.004 INFO JRE provisioning: os[linux], arch[x86_64]
2024-09-19T12:24:19.1616098Z 12:24:19.160 INFO Communicating with SonarCloud
2024-09-19T12:24:19.4655088Z 12:24:19.464 INFO Starting SonarScanner Engine...
2024-09-19T12:24:19.4665882Z 12:24:19.466 INFO Java 17.0.11 Eclipse Adoptium (64-bit)
2024-09-19T12:24:20.2821556Z 12:24:20.281 INFO Load global settings
2024-09-19T12:24:20.6128097Z 12:24:20.610 INFO Load global settings (done) | time=330ms
2024-09-19T12:24:20.6146516Z 12:24:20.614 INFO Server id: 1BD809FA-AWHW8ct9-T_TB3XqouNu
2024-09-19T12:24:20.7526211Z 12:24:20.752 INFO Loading required plugins
2024-09-19T12:24:20.7559708Z 12:24:20.753 INFO Load plugins index
2024-09-19T12:24:20.8279197Z 12:24:20.825 INFO Load plugins index (done) | time=70ms
2024-09-19T12:24:20.8280621Z 12:24:20.826 INFO Load/download plugins
2024-09-19T12:24:21.9082885Z 12:24:21.907 INFO Load/download plugins (done) | time=1081ms
2024-09-19T12:24:22.2724649Z 12:24:22.271 INFO Found an active CI vendor: 'Azure DevOps'
2024-09-19T12:24:22.2843463Z 12:24:22.283 INFO Load project settings for component key: 'xyz-api'
2024-09-19T12:24:22.3581796Z 12:24:22.356 INFO Load project settings for component key: 'xyz-api' (done) | time=74ms
2024-09-19T12:24:22.3637933Z 12:24:22.363 INFO Process project properties
2024-09-19T12:24:22.3721875Z 12:24:22.371 INFO Project key: xyz-api
2024-09-19T12:24:22.3722972Z 12:24:22.371 INFO Base dir: /home/vsts/work/1/s
2024-09-19T12:24:22.3723291Z 12:24:22.371 INFO Working dir: /home/vsts/work/1/s/.scannerwork
2024-09-19T12:24:22.3809667Z 12:24:22.380 INFO Load project branches
2024-09-19T12:24:22.4723975Z 12:24:22.468 INFO Load project branches (done) | time=89ms
2024-09-19T12:24:22.4738753Z 12:24:22.472 INFO Check ALM binding of project 'xyz-api'
2024-09-19T12:24:22.5337815Z 12:24:22.533 INFO Detected project binding: BOUND
2024-09-19T12:24:22.5342682Z 12:24:22.533 INFO Check ALM binding of project 'xyz-api' (done) | time=63ms
2024-09-19T12:24:22.5372921Z 12:24:22.536 INFO Load project pull requests
2024-09-19T12:24:22.6941779Z 12:24:22.691 INFO Load project pull requests (done) | time=154ms
2024-09-19T12:24:22.6942137Z 12:24:22.691 INFO Load branch configuration
2024-09-19T12:24:23.4437983Z 12:24:23.439 INFO Load branch configuration (done) | time=746ms
2024-09-19T12:24:23.4439951Z 12:24:23.443 INFO Load quality profiles
2024-09-19T12:24:23.9045117Z 12:24:23.900 INFO Load quality profiles (done) | time=457ms
2024-09-19T12:24:23.9061056Z 12:24:23.903 INFO Load active rules
2024-09-19T12:24:27.9641483Z 12:24:27.963 INFO Load active rules (done) | time=4059ms
2024-09-19T12:24:28.0832801Z 12:24:28.080 INFO Organization key: xyzorg
2024-09-19T12:24:28.0838372Z 12:24:28.083 INFO Pull request 1114 for merge into develop from feature/XYZ-123
2024-09-19T12:24:28.1051457Z 12:24:28.103 INFO Preprocessing files...
2024-09-19T12:24:28.6324866Z 12:24:28.632 INFO 5 languages detected in 920 preprocessed files
2024-09-19T12:24:28.6361433Z 12:24:28.635 INFO 944 files ignored because of inclusion/exclusion patterns
2024-09-19T12:24:28.6362136Z 12:24:28.635 INFO 6 files ignored because of scm ignore settings
2024-09-19T12:24:28.7136327Z 12:24:28.713 INFO Loading plugins for detected languages
2024-09-19T12:24:28.7169352Z 12:24:28.715 INFO Load/download plugins
2024-09-19T12:24:29.5273434Z 12:24:29.526 INFO Load/download plugins (done) | time=811ms
2024-09-19T12:24:29.7283724Z 12:24:29.727 INFO Load project repositories
2024-09-19T12:24:29.8197883Z 12:24:29.819 INFO Load project repositories (done) | time=89ms
2024-09-19T12:24:29.8198642Z 12:24:29.819 INFO SCM collecting changed files in the branch
2024-09-19T12:24:29.9781381Z 12:24:29.973 INFO SCM collecting changed files in the branch (done) | time=157ms
2024-09-19T12:24:29.9962818Z 12:24:29.992 INFO Indexing files...
2024-09-19T12:24:29.9974117Z 12:24:29.996 INFO Project configuration:
2024-09-19T12:24:29.9975113Z 12:24:29.996 INFO Excluded sources: **/build-wrapper-dump.json, **/*_mock.go, **/*_test.go, **/assets/**/*.html, **/*_test.go
2024-09-19T12:24:30.0033270Z 12:24:30.002 INFO Included ***: **/*_test.go
2024-09-19T12:24:30.0036531Z 12:24:30.002 INFO Excluded sources for coverage: cmd/**
2024-09-19T12:24:30.2027339Z 12:24:30.201 INFO 499 files indexed
2024-09-19T12:24:30.2160795Z 12:24:30.212 INFO Quality profile for go: Sonar way
2024-09-19T12:24:30.2162275Z 12:24:30.215 INFO Quality profile for json: Sonar way
2024-09-19T12:24:30.2163472Z 12:24:30.215 INFO Quality profile for plsql: Sonar way
2024-09-19T12:24:30.2164629Z 12:24:30.215 INFO Quality profile for web: Sonar way
2024-09-19T12:24:30.2165770Z 12:24:30.215 INFO Quality profile for yaml: Sonar way
2024-09-19T12:24:30.2167153Z 12:24:30.215 INFO ------------- Run sensors on module xyz-api
2024-09-19T12:24:30.2874572Z 12:24:30.286 INFO Load metrics repository
2024-09-19T12:24:30.3474041Z 12:24:30.345 INFO Load metrics repository (done) | time=60ms
2024-09-19T12:24:30.3519549Z 12:24:30.351 INFO Sensor cache enabled
2024-09-19T12:24:30.4875248Z 12:24:30.486 INFO Load sensor cache
2024-09-19T12:24:31.4953797Z 12:24:31.493 INFO Load sensor cache (1 MB) | time=1004ms
2024-09-19T12:24:32.2534636Z 12:24:32.250 INFO Sensor HTML [web]
2024-09-19T12:24:32.2537464Z 12:24:32.250 INFO Sensor HTML is restricted to changed files only
2024-09-19T12:24:32.2675805Z 12:24:32.266 INFO Sensor HTML [web] (done) | time=16ms
2024-09-19T12:24:32.2683153Z 12:24:32.266 INFO Sensor JaCoCo XML Report Importer [jacoco]
2024-09-19T12:24:32.2689289Z 12:24:32.267 INFO 'sonar.coverage.jacoco.xmlReportPaths' is not defined. Using default locations: target/site/jacoco/jacoco.xml,target/site/jacoco-it/jacoco.xml,build/reports/jacoco/test/jacocoTestReport.xml
2024-09-19T12:24:32.2704511Z 12:24:32.268 INFO No report imported, no coverage information will be imported by JaCoCo XML Report Importer
2024-09-19T12:24:32.2704956Z 12:24:32.269 INFO Sensor JaCoCo XML Report Importer [jacoco] (done) | time=3ms
2024-09-19T12:24:32.2705275Z 12:24:32.270 INFO Sensor Code Quality and Security for Go [go]
2024-09-19T12:24:32.2784656Z 12:24:32.277 INFO 460 source files to be analyzed
2024-09-19T12:24:32.2959177Z 12:24:32.292 INFO The Go analyzer is running in a context where unchanged files can be skipped.
2024-09-19T12:24:33.3556040Z ##[error]12:24:33.353 ERROR Error during SonarScanner Engine execution
java.lang.IllegalArgumentException: 4 is not a valid line offset for pointer. File internal/package/xyz.go has 0 character(s) at line 30
at org.sonar.api.utils.Preconditions.checkArgument(Preconditions.java:43)
at org.sonar.api.batch.fs.internal.DefaultInputFile.checkValid(DefaultInputFile.java:338)
at org.sonar.api.batch.fs.internal.DefaultInputFile.newPointer(DefaultInputFile.java:271)
at org.sonar.api.batch.fs.internal.DefaultInputFile.newRange(DefaultInputFile.java:287)
at org.sonarsource.slang.plugin.InputFileContext.textRange(InputFileContext.java:55)
at org.sonarsource.slang.plugin.CpdVisitor.reusePreviousResults(CpdVisitor.java:92)
at org.sonarsource.slang.plugin.SlangSensor.reusePreviousResults(SlangSensor.java:189)
at org.sonarsource.slang.plugin.SlangSensor.lambda$analyseFile$2(SlangSensor.java:141)
at java.base/java.util.stream.Collectors.lambda$uniqKeysMapAccumulator$1(Unknown Source)
at java.base/java.util.stream.ReduceOps$3ReducingSink.accept(Unknown Source)
at java.base/java.util.stream.ReferencePipeline$3$1.accept(Unknown Source)
at java.base/java.util.stream.ReferencePipeline$2$1.accept(Unknown Source)
at java.base/java.util.Spliterators$ArraySpliterator.forEachRemaining(Unknown Source)
at java.base/java.util.stream.AbstractPipeline.copyInto(Unknown Source)
at java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(Unknown Source)
at java.base/java.util.stream.ReduceOps$ReduceOp.evaluateSequential(Unknown Source)
at java.base/java.util.stream.AbstractPipeline.evaluate(Unknown Source)
at java.base/java.util.stream.ReferencePipeline.collect(Unknown Source)
at org.sonarsource.slang.plugin.SlangSensor.analyseFile(SlangSensor.java:141)
at org.sonarsource.slang.plugin.SlangSensor.analyseFiles(SlangSensor.java:117)
at org.sonarsource.slang.plugin.SlangSensor.execute(SlangSensor.java:231)
at org.sonar.scanner.sensor.AbstractSensorWrapper.analyse(AbstractSensorWrapper.java:63)
at org.sonar.scanner.sensor.ModuleSensorsExecutor.execute(ModuleSensorsExecutor.java:75)
at org.sonar.scanner.sensor.ModuleSensorsExecutor.lambda$execute$1(ModuleSensorsExecutor.java:48)
at org.sonar.scanner.sensor.ModuleSensorsExecutor.withModuleStrategy(ModuleSensorsExecutor.java:66)
at org.sonar.scanner.sensor.ModuleSensorsExecutor.execute(ModuleSensorsExecutor.java:48)
at org.sonar.scanner.scan.ModuleScanContainer.doAfterStart(ModuleScanContainer.java:64)
at org.sonar.core.platform.ComponentContainer.startComponents(ComponentContainer.java:123)
at org.sonar.core.platform.ComponentContainer.execute(ComponentContainer.java:109)
at org.sonar.scanner.scan.ProjectScanContainer.scan(ProjectScanContainer.java:192)
at org.sonar.scanner.scan.ProjectScanContainer.scanRecursively(ProjectScanContainer.java:188)
at org.sonar.scanner.scan.ProjectScanContainer.doAfterStart(ProjectScanContainer.java:159)
at org.sonar.core.platform.ComponentContainer.startComponents(ComponentContainer.java:123)
at org.sonar.core.platform.ComponentContainer.execute(ComponentContainer.java:109)
at org.sonar.scanner.bootstrap.ScannerContainer.doAfterStart(ScannerContainer.java:416)
at org.sonar.core.platform.ComponentContainer.startComponents(ComponentContainer.java:123)
at org.sonar.core.platform.ComponentContainer.execute(ComponentContainer.java:109)
at org.sonar.scanner.bootstrap.GlobalContainer.doAfterStart(GlobalContainer.java:128)
at org.sonar.core.platform.ComponentContainer.startComponents(ComponentContainer.java:123)
at org.sonar.core.platform.ComponentContainer.execute(ComponentContainer.java:109)
at org.sonar.scanner.bootstrap.ScannerMain.runScannerEngine(ScannerMain.java:135)
at org.sonar.scanner.bootstrap.ScannerMain.run(ScannerMain.java:52)
at org.sonar.scanner.bootstrap.ScannerMain.main(ScannerMain.java:38)
2024-09-19T12:24:33.3571303Z 12:24:33.353 ERROR Error during SonarScanner Engine execution
2024-09-19T12:24:33.3572138Z java.lang.IllegalArgumentException: 4 is not a valid line offset for pointer. File internal/package/xyz.go has 0 character(s) at line 30
2024-09-19T12:24:33.3574327Z at org.sonar.api.utils.Preconditions.checkArgument(Preconditions.java:43)
2024-09-19T12:24:33.3574966Z at org.sonar.api.batch.fs.internal.DefaultInputFile.checkValid(DefaultInputFile.java:338)
2024-09-19T12:24:33.3575387Z at org.sonar.api.batch.fs.internal.DefaultInputFile.newPointer(DefaultInputFile.java:271)
2024-09-19T12:24:33.3575942Z at org.sonar.api.batch.fs.internal.DefaultInputFile.newRange(DefaultInputFile.java:287)
2024-09-19T12:24:33.3576334Z at org.sonarsource.slang.plugin.InputFileContext.textRange(InputFileContext.java:55)
2024-09-19T12:24:33.3576722Z at org.sonarsource.slang.plugin.CpdVisitor.reusePreviousResults(CpdVisitor.java:92)
2024-09-19T12:24:33.3577106Z at org.sonarsource.slang.plugin.SlangSensor.reusePreviousResults(SlangSensor.java:189)
2024-09-19T12:24:33.3577470Z at org.sonarsource.slang.plugin.SlangSensor.lambda$analyseFile$2(SlangSensor.java:141)
2024-09-19T12:24:33.3577831Z at java.base/java.util.stream.Collectors.lambda$uniqKeysMapAccumulator$1(Unknown Source)
2024-09-19T12:24:33.3578182Z at java.base/java.util.stream.ReduceOps$3ReducingSink.accept(Unknown Source)
2024-09-19T12:24:33.3578514Z at java.base/java.util.stream.ReferencePipeline$3$1.accept(Unknown Source)
2024-09-19T12:24:33.3578815Z at java.base/java.util.stream.ReferencePipeline$2$1.accept(Unknown Source)
2024-09-19T12:24:33.3579155Z at java.base/java.util.Spliterators$ArraySpliterator.forEachRemaining(Unknown Source)
2024-09-19T12:24:33.3579496Z at java.base/java.util.stream.AbstractPipeline.copyInto(Unknown Source)
2024-09-19T12:24:33.3579823Z at java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(Unknown Source)
2024-09-19T12:24:33.3580149Z at java.base/java.util.stream.ReduceOps$ReduceOp.evaluateSequential(Unknown Source)
2024-09-19T12:24:33.3585201Z at java.base/java.util.stream.AbstractPipeline.evaluate(Unknown Source)
2024-09-19T12:24:33.3585529Z at java.base/java.util.stream.ReferencePipeline.collect(Unknown Source)
2024-09-19T12:24:33.3585879Z at org.sonarsource.slang.plugin.SlangSensor.analyseFile(SlangSensor.java:141)
2024-09-19T12:24:33.3586233Z at org.sonarsource.slang.plugin.SlangSensor.analyseFiles(SlangSensor.java:117)
2024-09-19T12:24:33.3586590Z at org.sonarsource.slang.plugin.SlangSensor.execute(SlangSensor.java:231)
2024-09-19T12:24:33.3586967Z at org.sonar.scanner.sensor.AbstractSensorWrapper.analyse(AbstractSensorWrapper.java:63)
2024-09-19T12:24:33.3587364Z at org.sonar.scanner.sensor.ModuleSensorsExecutor.execute(ModuleSensorsExecutor.java:75)
2024-09-19T12:24:33.3587760Z at org.sonar.scanner.sensor.ModuleSensorsExecutor.lambda$execute$1(ModuleSensorsExecutor.java:48)
2024-09-19T12:24:33.3588171Z at org.sonar.scanner.sensor.ModuleSensorsExecutor.withModuleStrategy(ModuleSensorsExecutor.java:66)
2024-09-19T12:24:33.3588564Z at org.sonar.scanner.sensor.ModuleSensorsExecutor.execute(ModuleSensorsExecutor.java:48)
2024-09-19T12:24:33.3588936Z at org.sonar.scanner.scan.ModuleScanContainer.doAfterStart(ModuleScanContainer.java:64)
2024-09-19T12:24:33.3589494Z at org.sonar.core.platform.ComponentContainer.startComponents(ComponentContainer.java:123)
2024-09-19T12:24:33.3589882Z at org.sonar.core.platform.ComponentContainer.execute(ComponentContainer.java:109)
2024-09-19T12:24:33.3590352Z at org.sonar.scanner.scan.ProjectScanContainer.scan(ProjectScanContainer.java:192)
2024-09-19T12:24:33.3590823Z at org.sonar.scanner.scan.ProjectScanContainer.scanRecursively(ProjectScanContainer.java:188)
2024-09-19T12:24:33.3591222Z at org.sonar.scanner.scan.ProjectScanContainer.doAfterStart(ProjectScanContainer.java:159)
2024-09-19T12:24:33.3591600Z at org.sonar.core.platform.ComponentContainer.startComponents(ComponentContainer.java:123)
2024-09-19T12:24:33.3591978Z at org.sonar.core.platform.ComponentContainer.execute(ComponentContainer.java:109)
2024-09-19T12:24:33.3592358Z at org.sonar.scanner.bootstrap.ScannerContainer.doAfterStart(ScannerContainer.java:416)
2024-09-19T12:24:33.3592760Z at org.sonar.core.platform.ComponentContainer.startComponents(ComponentContainer.java:123)
2024-09-19T12:24:33.3593137Z at org.sonar.core.platform.ComponentContainer.execute(ComponentContainer.java:109)
2024-09-19T12:24:33.3593570Z at org.sonar.scanner.bootstrap.GlobalContainer.doAfterStart(GlobalContainer.java:128)
2024-09-19T12:24:33.3593942Z at org.sonar.core.platform.ComponentContainer.startComponents(ComponentContainer.java:123)
2024-09-19T12:24:33.3594305Z at org.sonar.core.platform.ComponentContainer.execute(ComponentContainer.java:109)
2024-09-19T12:24:33.3594670Z at org.sonar.scanner.bootstrap.ScannerMain.runScannerEngine(ScannerMain.java:135)
2024-09-19T12:24:33.3595013Z at org.sonar.scanner.bootstrap.ScannerMain.run(ScannerMain.java:52)
2024-09-19T12:24:33.3595352Z at org.sonar.scanner.bootstrap.ScannerMain.main(ScannerMain.java:38)
2024-09-19T12:24:33.3595502Z
2024-09-19T12:24:33.6857401Z 12:24:33.685 INFO EXECUTION FAILURE
2024-09-19T12:24:33.6869719Z 12:24:33.686 INFO Total time: 18.473s
2024-09-19T12:24:34.0105675Z ##[warning]Can't find loc string for key: LIB_ProcessExitCode
2024-09-19T12:24:34.0114972Z ##[warning]Error while executing SonarCloud:Analyze task: LIB_ProcessExitCode /home/vsts/work/_tasks/SonarCloudAnalyze____xyz___/2.3.2/sonar-scanner/bin/sonar-scanner 3
2024-09-19T12:24:34.0117428Z ##[error]LIB_ProcessExitCode /home/vsts/work/_tasks/SonarCloudAnalyze____xyz___/2.3.2/sonar-scanner/bin/sonar-scanner 3
2024-09-19T12:24:34.0164139Z ##[section]Finishing: SonarCloudAnalyze
On this golang project, I’m starting receiving errors when GH execute this step:
22:20:21.749 ERROR Error during SonarScanner Engine execution
java.lang.IllegalArgumentException: 40 is not a valid line offset for pointer. File internal/datamodel.go has 39 character(s) at line 30
at org.sonar.api.utils.Preconditions.checkArgument(Preconditions.java:43)
at org.sonar.api.batch.fs.internal.DefaultInputFile.checkValid(DefaultInputFile.java:338)
When I rebase from main, it solves the problem. Any idea? Is there any way to disable this check?
We are currently using sonar-scanner plugin for Bitbucket cloud:
pipe: sonarsource/sonarcloud-scan:2.0.0
For the last couple of months analysis has been working ok and was working ok yesterday.
However all pull requests now into our stable branch are now failing with the error:
ERROR: Error during SonarScanner execution
java.lang.IllegalArgumentException: 13 is not a valid line offset for pointer. File path-to-ruby-file.rb has 5 character(s) at line 27
at org.sonar.api.utils.Preconditions.checkArgument(Preconditions.java:43)
at org.sonar.api.batch.fs.internal.DefaultInputFile.checkValid(DefaultInputFile.java:338)
This only happens in bitbucket pipelines. I cannot reproduce locally. The ruby file is already utf-8/us-ascii encoded.
The ruby file has not been modified in several years.
What might be going wrong?
Thanks in advance for your help!
I’ve merged these 3 threads together, since all relate to languages related to GitHub - SonarSource/slang. We’ve flagged the relevant devs to come take a look.
With the rollback in place, you should no longer need to disable the cache to run your analyses without errors.
We are currently working on a permanent fix that should enable you to safely benefit from the improved duplication detection without having to disable the cache.