Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Lizard integration #90

Open
wants to merge 20 commits into
base: master
Choose a base branch
from
Open

Lizard integration #90

wants to merge 20 commits into from

Conversation

agh92
Copy link

@agh92 agh92 commented Jun 5, 2015

Hello everyone,

Here is a Pull Request to add Lizard support (https://github.com/terryyin/lizard) to the plugin.
"Lizard is a simple code complexity analyzer" it can create an xml report,
which contains die cyclomatic complexity for a file and their functions.

Details:

  • Added Lizard classes into plugins.objectivec.complexity package
  • ObjectiveCSquidSensor does not save Complexity, Functions and File/Funciton Complexity distribution any more. This functionality is implemented in the Lizard classes.
  • Updated run-sonar.sh to run lizard command and save the xml report in sonar-reports/lizard-report.xml

iav-dev and others added 14 commits May 28, 2015 14:43
…and measure persistor class created to save the measures of the lizard repor.
… values are displayed as 0 in the dashboard. Trying to savin complexity throws exception -> Can not add the same measure twice on org.sonar.api.resources.File ...
…uld actually do because it was causing that saving comlexity and functions for files throw exception. Lizard measure now saves the measures succesfully
@tbores
Copy link

tbores commented Jun 5, 2015

We are absolutely need the complexity metric in our QA model. We have tested this new feature, please approve the Pull Request.

@orangesignal
Copy link

👍

iav-dev and others added 2 commits June 30, 2015 09:41
… the lizard report is not found, allowing the execution of the plugin without lizard
@pmwheatley
Copy link

👍
Confirmed changes work as expected. Cyclomatic complexity is an extremely valuable metric for us - would be nice to see this merged

@cyrilpicat
Copy link
Contributor

ok, thanks for the feedback, I will merge it. Sorry for the delay by the way.

@cyupa
Copy link

cyupa commented Sep 3, 2015

👍

@akshaysyaduvanshi
Copy link

This is working fine with me. Why aren't we merging this.

@amin234
Copy link

amin234 commented Mar 30, 2016

lizard.xml is generated but not shown in dashboard

@niitMobileLab
Copy link

Hi @amin234 , Even I'm facing the same problem.
I've configured objective c sonar project and it's able to generate lizard.xml in sonar-reports folder and I've given the same path in sonar console under complexity of objective c but still complexity widget not appearing. Pls let me know if you got any solution for this.

Thanks

@yramya20
Copy link

@akshaysyaduvanshi How did you resolve the below error? I have the same issue now.

Getting this error
I created xml with lizard --xml

Processing complexity report

ERROR - Error processing file named /Applications/GoAgent.app/pipelines/ios-sonar/ios/Source/sonar-reports/lizard-report.xml

com.sun.org.apache.xerces.internal.impl.io.MalformedByteSequenceException: Invalid byte 2 of 3-byte UTF-8 sequence.

at com.sun.org.apache.xerces.internal.impl.io.UTF8Reader.invalidByte(UTF8Reader.java:687) ~[na:1.7.0_60]

at com.sun.org.apache.xerces.internal.impl.io.UTF8Reader.read(UTF8Reader.java:408) ~[na:1.7.0_60]

at com.sun.org.apache.xerces.internal.impl.XMLEntityScanner.load(XMLEntityScanner.java:1753) ~[na:1.7.0_60]

at com.sun.org.apache.xerces.internal.impl.XMLEntityScanner.scanLiteral(XMLEntityScanner.java:1074) ~[na:1.7.0_60]

at com.sun.org.apache.xerces.internal.impl.XMLScanner.scanAttributeValue(XMLScanner.java:835) ~[na:1.7.0_60]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.