pmayweg / sonar-groovy

SonarQube plugin for Groovy
GNU Lesser General Public License v3.0
52 stars 65 forks source link

Error when scanning groovy files using Azure devops #87

Open nikhiljainonline opened 5 years ago

nikhiljainonline commented 5 years ago

Hi

I am getting below error when sonarqube tries to analyse the groovy files.

2019-01-29T09:59:16.9751645Z 10:59:16.974 DEBUG: 'Sprint Release.groovy' generated metadata with charset 'UTF-8' 2019-01-29T09:59:17.0140545Z 10:59:17.008 DEBUG: 'Release-NL.groovy' generated metadata with charset 'UTF-8' 2019-01-29T09:59:17.0261678Z 10:59:17.025 DEBUG: 'MonthlyGenericTasks.groovy' generated metadata with charset 'UTF-8' 2019-01-29T09:59:17.0375961Z 10:59:17.036 DEBUG: 'Release-BE.groovy' generated metadata with charset 'windows-1252' 2019-01-29T09:59:17.0482270Z 10:59:17.047 INFO: Sensor CodeNarc [groovy] (done) | time=8355ms 2019-01-29T09:59:17.0482912Z 10:59:17.047 INFO: Sensor GroovySensor [groovy] 2019-01-29T09:59:17.0558088Z ##[error]10:59:17.054 ERROR: Unexpected token when lexing file : MonthlyGenericTasks.groovy groovyjarjarantlr.TokenStreamRecognitionException: unexpected char: 0xBB at org.codehaus.groovy.antlr.parser.GroovyLexer.nextToken(GroovyLexer.java:728) at org.codehaus.groovy.antlr.parser.GroovyLexer$1.nextToken(GroovyLexer.java:262) at org.sonar.plugins.groovy.GroovySensor.computeBaseMetrics(GroovySensor.java:221) at org.sonar.plugins.groovy.GroovySensor.computeBaseMetrics(GroovySensor.java:203) at org.sonar.plugins.groovy.GroovySensor.execute(GroovySensor.java:107) at org.sonar.scanner.sensor.SensorWrapper.analyse(SensorWrapper.java:53) at org.sonar.scanner.phases.SensorsExecutor.executeSensor(SensorsExecutor.java:88) at org.sonar.scanner.phases.SensorsExecutor.execute(SensorsExecutor.java:82) at org.sonar.scanner.phases.SensorsExecutor.execute(SensorsExecutor.java:68) at org.sonar.scanner.phases.AbstractPhaseExecutor.execute(AbstractPhaseExecutor.java:88) at org.sonar.scanner.scan.ModuleScanContainer.doAfterStart(ModuleScanContainer.java:180) at org.sonar.core.platform.ComponentContainer.startComponents(ComponentContainer.java:135) at org.sonar.core.platform.ComponentContainer.execute(ComponentContainer.java:121) at org.sonar.scanner.scan.ProjectScanContainer.scan(ProjectScanContainer.java:288) at org.sonar.scanner.scan.ProjectScanContainer.scanRecursively(ProjectScanContainer.java:283) at org.sonar.scanner.scan.ProjectScanContainer.doAfterStart(ProjectScanContainer.java:261) at org.sonar.core.platform.ComponentContainer.startComponents(ComponentContainer.java:135) at org.sonar.core.platform.ComponentContainer.execute(ComponentContainer.java:121) at org.sonar.scanner.task.ScanTask.execute(ScanTask.java:48) at org.sonar.scanner.task.TaskContainer.doAfterStart(TaskContainer.java:84) at org.sonar.core.platform.ComponentContainer.startComponents(ComponentContainer.java:135) at org.sonar.core.platform.ComponentContainer.execute(ComponentContainer.java:121) at org.sonar.scanner.bootstrap.GlobalContainer.executeTask(GlobalContainer.java:121) at org.sonar.batch.bootstrapper.Batch.doExecuteTask(Batch.java:116) at org.sonar.batch.bootstrapper.Batch.execute(Batch.java:71) at org.sonarsource.scanner.api.internal.batch.BatchIsolatedLauncher.execute(BatchIsolatedLauncher.java:46) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at org.sonarsource.scanner.api.internal.IsolatedLauncherProxy.invoke(IsolatedLauncherProxy.java:60) at com.sun.proxy.$Proxy0.execute(Unknown Source) at org.sonarsource.scanner.api.EmbeddedScanner.doExecute(EmbeddedScanner.java:171) at org.sonarsource.scanner.api.EmbeddedScanner.execute(EmbeddedScanner.java:128) at org.sonarsource.scanner.cli.Main.execute(Main.java:111) at org.sonarsource.scanner.cli.Main.execute(Main.java:75) at org.sonarsource.scanner.cli.Main.main(Main.java:61) 2019-01-29T09:59:17.0560129Z ##[debug]Processed: ##vso[task.logissue type=error;]10:59:17.054 ERROR: Unexpected token when lexing file : MonthlyGenericTasks.groovy%0Agroovyjarjarantlr.TokenStreamRecognitionException: unexpected char: 0xBB%0D%0A at org.codehaus.groovy.antlr.parser.GroovyLexer.nextToken(GroovyLexer.java:728)%0D%0A at org.codehaus.groovy.antlr.parser.GroovyLexer$1.nextToken(GroovyLexer.java:262)%0D%0A at org.sonar.plugins.groovy.GroovySensor.computeBaseMetrics(GroovySensor.java:221)%0D%0A at org.sonar.plugins.groovy.GroovySensor.computeBaseMetrics(GroovySensor.java:203)%0D%0A at org.sonar.plugins.groovy.GroovySensor.execute(GroovySensor.java:107)%0D%0A at org.sonar.scanner.sensor.SensorWrapper.analyse(SensorWrapper.java:53)%0D%0A at org.sonar.scanner.phases.SensorsExecutor.executeSensor(SensorsExecutor.java:88)%0D%0A at org.sonar.scanner.phases.SensorsExecutor.execute(SensorsExecutor.java:82)%0D%0A at org.sonar.scanner.phases.SensorsExecutor.execute(SensorsExecutor.java:68)%0D%0A at org.sonar.scanner.phases.AbstractPhaseExecutor.execute(AbstractPhaseExecutor.java:88)%0D%0A at org.sonar.scanner.scan.ModuleScanContainer.doAfterStart(ModuleScanContainer.java:180)%0D%0A at org.sonar.core.platform.ComponentContainer.startComponents(ComponentContainer.java:135)%0D%0A at org.sonar.core.platform.ComponentContainer.execute(ComponentContainer.java:121)%0D%0A at org.sonar.scanner.scan.ProjectScanContainer.scan(ProjectScanContainer.java:288)%0D%0A at org.sonar.scanner.scan.ProjectScanContainer.scanRecursively(ProjectScanContainer.java:283)%0D%0A at org.sonar.scanner.scan.ProjectScanContainer.doAfterStart(ProjectScanContainer.java:261)%0D%0A at org.sonar.core.platform.ComponentContainer.startComponents(ComponentContainer.java:135)%0D%0A at org.sonar.core.platform.ComponentContainer.execute(ComponentContainer.java:121)%0D%0A at org.sonar.scanner.task.ScanTask.execute(ScanTask.java:48)%0D%0A at org.sonar.scanner.task.TaskContainer.doAfterStart(TaskContainer.java:84)%0D%0A at org.sonar.core.platform.ComponentContainer.startComponents(ComponentContainer.java:135)%0D%0A at org.sonar.core.platform.ComponentContainer.execute(ComponentContainer.java:121)%0D%0A at org.sonar.scanner.bootstrap.GlobalContainer.executeTask(GlobalContainer.java:121)%0D%0A at org.sonar.batch.bootstrapper.Batch.doExecuteTask(Batch.java:116)%0D%0A at org.sonar.batch.bootstrapper.Batch.execute(Batch.java:71)%0D%0A at org.sonarsource.scanner.api.internal.batch.BatchIsolatedLauncher.execute(BatchIsolatedLauncher.java:46)%0D%0A at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)%0D%0A at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)%0D%0A at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)%0D%0A at java.lang.reflect.Method.invoke(Method.java:498)%0D%0A at org.sonarsource.scanner.api.internal.IsolatedLauncherProxy.invoke(IsolatedLauncherProxy.java:60)%0D%0A at com.sun.proxy.$Proxy0.execute(Unknown Source)%0D%0A at org.sonarsource.scanner.api.EmbeddedScanner.doExecute(EmbeddedScanner.java:171)%0D%0A at org.sonarsource.scanner.api.EmbeddedScanner.execute(EmbeddedScanner.java:128)%0D%0A at org.sonarsource.scanner.cli.Main.execute(Main.java:111)%0D%0A at org.sonarsource.scanner.cli.Main.execute(Main.java:75)%0D%0A at org.sonarsource.scanner.cli.Main.main(Main.java:61)