SonarQube Plugins
  1. SonarQube Plugins
  2. SONARPLUGINS-596

Error when parsing certain files for duplications

    Details

    • Type: Bug Bug
    • Status: Closed Closed
    • Priority: Critical Critical
    • Resolution: Fixed
    • Affects Version/s: GROOVY-0.1
    • Fix Version/s: GROOVY-0.5
    • Component/s: Groovy
    • Labels:
      None
    • Patch Submitted:
      Yes
    • Number of attachments :
      0

      Description

      The following error can happen. This seems to be fixed in the version 1.7 of groovy parser. CodeNarc is currently in 1.6

      [ERROR]  Unexpected token when lexing file : /Users/holly/Downloads/Gosu-codenarc/src/main/groovy/org/codenarc/util/io/ClassPathResource.groovy
      groovyjarjarantlr.TokenStreamRecognitionException: expecting anything but ''\n''; got it anyway
      	at org.codehaus.groovy.antlr.parser.GroovyLexer.nextToken(GroovyLexer.java:696) [na:na]
      	at org.sonar.plugins.groovy.foundation.GroovyCpdTokenizer.tokenize(GroovyCpdTokenizer.java:45) [na:na]
      	at org.sonar.duplications.cpd.CPD.add(CPD.java:109) [sonar-duplications-2.2.jar:na]
      	at org.sonar.duplications.cpd.CPD.add(CPD.java:74) [sonar-duplications-2.2.jar:na]
      	at org.sonar.plugins.cpd.CpdSensor.configureCPD(CpdSensor.java:109) [sonar-cpd-plugin-2.2.jar:na]
      	at org.sonar.plugins.cpd.CpdSensor.executeCPD(CpdSensor.java:88) [sonar-cpd-plugin-2.2.jar:na]
      	at org.sonar.plugins.cpd.CpdSensor.analyse(CpdSensor.java:68) [sonar-cpd-plugin-2.2.jar:na]
      	at org.sonar.batch.SensorsExecutor.execute(SensorsExecutor.java:58) [sonar-batch-2.2.jar:na]
      	at org.sonar.batch.ProjectBatch.execute(ProjectBatch.java:53) [sonar-batch-2.2.jar:na]
      	at org.sonar.batch.Batch.analyzeProject(Batch.java:112) [sonar-batch-2.2.jar:na]
      	at org.sonar.batch.Batch.analyzeProjects(Batch.java:81) [sonar-batch-2.2.jar:na]
      	at org.sonar.batch.Batch.execute(Batch.java:57) [sonar-batch-2.2.jar:na]
      	at org.sonar.maven2.BatchMojo.executeBatch(BatchMojo.java:142) [sonar-core-maven-plugin-20100727133639.jar:na]
      	at org.sonar.maven2.BatchMojo.execute(BatchMojo.java:133) [sonar-core-maven-plugin-20100727133639.jar:na]
      	at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:483) [maven-2.2.0-uber.jar:2.2.0]
      	at org.codehaus.mojo.sonar.Bootstraper.executeMojo(Bootstraper.java:82) [sonar-maven-plugin-1.0-beta-1.jar:na]
      	at org.codehaus.mojo.sonar.Bootstraper.start(Bootstraper.java:65) [sonar-maven-plugin-1.0-beta-1.jar:na]
      	at org.codehaus.mojo.sonar.SonarMojo.execute(SonarMojo.java:117) [sonar-maven-plugin-1.0-beta-1.jar:na]
      	at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:483) [maven-2.2.0-uber.jar:2.2.0]
      	at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:678) [maven-2.2.0-uber.jar:2.2.0]
      	at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeStandaloneGoal(DefaultLifecycleExecutor.java:553) [maven-2.2.0-uber.jar:2.2.0]
      	at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:523) [maven-2.2.0-uber.jar:2.2.0]
      	at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:371) [maven-2.2.0-uber.jar:2.2.0]
      	at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:268) [maven-2.2.0-uber.jar:2.2.0]
      	at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:181) [maven-2.2.0-uber.jar:2.2.0]
      	at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:356) [maven-2.2.0-uber.jar:2.2.0]
      	at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:137) [maven-2.2.0-uber.jar:2.2.0]
      	at org.apache.maven.cli.MavenCli.main(MavenCli.java:362) [maven-2.2.0-uber.jar:2.2.0]
      	at org.apache.maven.cli.compat.CompatibleMain.main(CompatibleMain.java:41) [maven-2.2.0-uber.jar:2.2.0]
      	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [na:1.6.0_20]
      	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) [na:1.6.0_20]
      	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) [na:1.6.0_20]
      	at java.lang.reflect.Method.invoke(Method.java:597) [na:1.6.0_20]
      	at org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315) [classworlds-1.1.jar:1.1]
      	at org.codehaus.classworlds.Launcher.launch(Launcher.java:255) [classworlds-1.1.jar:1.1]
      	at org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430) [classworlds-1.1.jar:1.1]
      	at org.codehaus.classworlds.Launcher.main(Launcher.java:375) [classworlds-1.1.jar:1.1]
      

        Activity

        No work has yet been logged on this issue.

          People

          • Assignee:
            Evgeny Mandrikov
            Reporter:
            Olivier Gaudin
          • Votes:
            12 Vote for this issue
            Watchers:
            6 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: