Issue Type: Bug Bug
Assignee: Simon Brandhof
Created: 23/Sep/13 8:23 AM
Description:

I'm using groovy plugin v 0.6 to analyze sources of my project. However the analysis by ant task fails with a RunnerException (see below).

Part of a groovy code :
String abstractText = ""
if(abstractText && abstractText.indexOf("]]>") < 0)
abstractText = "<![CDATA[$abstractText]]>"
else
abstractText = StringEscapeUtils.escapeXml(abstractText)

in the codeNarc report there is a violation for ElseBlockBraces with a souceLine with CDATA that is not escaped properly.

[13:56:48]: [sonar:sonar] org.sonar.runner.RunnerException: org.sonar.api.utils.SonarException: Unabel to parse file: \91d1abbce959fae3\scripts\.sonar\adlex.rtm.grvy_trunk_RTM-grvy\codenarc\report1.xml
[13:56:48]: [antcall] The following error occurred while executing this line:
\91d1abbce959fae3\scripts\build_sonar.xml:204: org.sonar.runner.RunnerException: org.sonar.api.utils.SonarException: Unabel to parse file: \91d1abbce959fae3\scripts\.sonar\adlex.rtm.grvy_trunk_RTM-grvy\codenarc\report1.xml
[13:56:48]: Process exited with code 1
[13:56:48]: Ant output:
[13:56:48]: at org.sonar.api.platform.ComponentContainer.startComponents(ComponentContainer.java:88)
[13:56:48]: at org.sonar.api.platform.ComponentContainer.execute(ComponentContainer.java:73)
[13:56:48]: at org.sonar.batch.bootstrapper.Batch.startBatch(Batch.java:86)
[13:56:48]: at org.sonar.batch.bootstrapper.Batch.execute(Batch.java:68)
[13:56:48]: at org.sonar.batch.Batch.execute(Batch.java:103)
[13:56:48]: at org.sonar.runner.internal.batch.Launcher.executeBatch(Launcher.java:69)
[13:56:48]: at org.sonar.runner.internal.batch.Launcher.execute(Launcher.java:61)
[13:56:48]: at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[13:56:48]: at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
[13:56:48]: at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
[13:56:48]: at java.lang.reflect.Method.invoke(Method.java:601)
[13:56:48]: at org.sonar.runner.Runner.delegateExecution(Runner.java:285)
[13:56:48]: ... 32 more
[13:56:48]: Caused by: com.ctc.wstx.exc.WstxUnexpectedCharException: Unexpected character ' ' (code 32) in content after '<' (malformed start element?).
[13:56:48]: at [row,col

{unknown-source}

]: [2,44626]
[13:56:48]: at com.ctc.wstx.sr.StreamScanner.throwUnexpectedChar(StreamScanner.java:612)
[13:56:48]: at com.ctc.wstx.sr.BasicStreamReader.nextFromTree(BasicStreamReader.java:2792)
[13:56:48]: at com.ctc.wstx.sr.BasicStreamReader.next(BasicStreamReader.java:1054)
[13:56:48]: at org.codehaus.staxmate.in.SMHierarchicCursor.skipToEndElement(SMHierarchicCursor.java:157)
[13:56:48]: at org.codehaus.staxmate.in.SMHierarchicCursor.getNext(SMHierarchicCursor.java:104)
[13:56:48]: at org.sonar.plugins.groovy.codenarc.CodeNarcXMLParser.stream(CodeNarcXMLParser.java:67)
[13:56:48]: at org.sonar.api.utils.StaxParser.parse(StaxParser.java:109)
[13:56:48]: at org.sonar.api.utils.StaxParser.parse(StaxParser.java:89)
[13:56:48]: at org.sonar.api.utils.StaxParser.parse(StaxParser.java:79)
[13:56:48]: at org.sonar.plugins.groovy.codenarc.CodeNarcXMLParser.parse(CodeNarcXMLParser.java:40)
[13:56:48]: ... 64 more

Project: Mojo's Sonar Maven Plugin
Priority: Major Major
Reporter: Radoslaw Szulgo
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
--------------------------------------------------------------------- To unsubscribe from this list, please visit: http://xircles.codehaus.org/manage_email

Reply via email to