Closed jamesreeve closed 9 years ago
Hi,
What analysis profile do you use ? And does it contain rules ?
The plugin install the OCLint profile, Make sure that it is the one used by your projects.
Hi i am using OCLint and yes it contains rules see screenshots here:
Ok,
Could you show me your OCLint output file (in sonar-reports dir of your project) ?
I would complemtent the analysis with:
You can make a Gist with all those files.
That being said, your issue looks similar to #52. There was a mean to fix it suggested by Drew, but it was using a deprecated API (index). If we could get your help and design a proper fix, that would be great.
thanks,
what may also help and helped us during analysis of a similar issue: add the -X Flag to running sonar runner (maybe this could be combined with the -v flag in an adapted version of the sh file)
Hi all, thanks for your fast responses. Lets try and fix this issue together :)
Glist with the files you were asking for: https://gist.github.com/1c950bade93dafe8f67b.git
rompic - I was unable to run sonar runner with a -X Flag, can you explain how i can do this? It did not recognise -X
regarding the test coverage being 0%, it's normal as you did not provide a test target. See the output log 'Skipping tests as no test scheme has been provided!'.
This has to be defined via the parameter 'sonar.objectivec.testScheme' in sonar-project.properties:
sonar.objectivec.testScheme=myApplicationTests
And regarding your Gist, I dont' know why but I do get a blank page. Is it working on your side?
Hi, yes i have turned off the test coverage. At this stage I am only interested in the code violations.
git clone my repo and then you will have access to the files.
i think we are facing the same problem. can we somehow help to solve this issue? the oclint.xml generated by the run-sonar.sh is almost empty: <?xml version="1.0" encoding="UTF-8"?>
from the log this fragment seems relevant:
12:04:33.324 INFO - Sensor org.sonar.plugins.objectivec.violations.OCLintSensor@b89b904... 12:04:33.324 INFO - Processing OCLint report /Users/xzy/Desktop/Jenkins/workspace/myproject_ios/./sonar-reports/oclint.xml 12:04:33.324 ERROR - Reporting 0 violations.
we have tried the OCLint profile (63 Rules) and also the Sonar Way, and we set the Sonar Way profile to extend the OCLint profile, so we can use both of them at the same time.
test scheme also commented out from our sonar-project.properties.
OK, I get it, sorry for this regression introduced by the fix #64. The problem was on the OCLint command line generated by the run-sonar.sh script, not on the plugin part. It should work with an old run-sonar.sh, with both 0.3 and 0.4 plugin versions.
I committed a new run-sonar.sh, so if you update yours it should work again. Can you verify it?
Beware that when you update the plugin you should update both the plugin JAR AND run-sonar.sh (for all projects, or in a central place if you have it this way). I updated the documentation to make this clearer and recommend putting run-sonar.sh in a central place.
Fantastic! it is all working for me now. Great work! I do however have issues with how run-sonar.sh is written when my sonar.sources contains spaces in the folder name.
I have just run the oclint rules and noticed that currently the library only has 2 rules in the major/blocker/critical rule list.
Do i have the latest copy of your rules? There these 2 rules the only ones you currently have for critical/blocker/major?
For the space issue, create a new issue and we will make sure to fix it
Hello,
I have been trying to get both v0.3 and 0.4 of your plugin working with Sonar but to no avail at all. I get the info on how many classes and it picks up changes when i put in code changes. But it claims there are no violations in the code but i even tried to put some in manually in the code to cause violations but they never get picked up.
I have tried running against different git projects too that I know do contain violations, but all come up with no violations and code coverage reports.
Let me know if you need anything else from me to help diagnose the issues I am getting.
First i will cover off what I have tried with version 0.4:
When i call run-sonar.sh -v i get:
Then I have also tried v0.3 of the plugin:
When i call run-sonar.sh -v i get: