Sonarqube * v10.5.1 (90531) * Community Edition
Windows Server
Sonarscanner CLI :sonar-scanner-5.0.1.3006-windows
Hello everyone
I’m analyzing a js project and sonarscanner fails on multiple .js files with this error:
ERROR: Failure during analysis
java.lang.IllegalArgumentException: 19 is not a valid line offset for pointer. File geco_job/globals.js has 1 character(s) at line 1140
at org.sonar.api.utils.Preconditions.checkArgument(Preconditions.java:43)
at org.sonar.api.batch.fs.internal.DefaultInputFile.checkValid(DefaultInputFile.java:374)
at org.sonar.api.batch.fs.internal.DefaultInputFile.newPointer(DefaultInputFile.java:307)
this file at the line 1140 have a TAB a LF e a CR and is like the image attached
14:23:22.964 WARN: Invalid character encountered in file C:/Temp/geco-2023-v7/geco_personnel/globals.js at line 124 for encoding UTF-8. Please fix file content or configure the encoding to be used using property 'sonar.sourceEncoding'.
Could you try providing this parameter to your analysis? sonar.sourceEncoding=UTF-8