octo-technology / sonar-objective-c

Sonar Plugin for Objective C
517 stars 208 forks source link

No violations showing up #85

Open devangpandya20 opened 9 years ago

devangpandya20 commented 9 years ago

I checked #71 #72 and #52 but am still facing the same issue. No violations are showing up in the dashboard. Below is my setup details and attaching a screenshot of the dashboard. I double checked and have the default quality profile set to OCLint. OS - 10.9.4 Xcode - 6.2 Sonar - 5.1 Sonar-runner - 2.4 sonar-objective-c - 0.4.0 screen shot 2015-04-28 at 10 34 47 am

gmdfalk commented 9 years ago

I have the same issue on OS 10.10, XCode 6.3. Analysis finishes fine, an oclint.xml is created which looks good, with lots of issues, but according to the webUI the amount of issues is 0 i.e. the report is not read/shown.

To be fair, oclint threw this during ./run-sonar.sh:

oclint: error: violations exceed threshold
P1=2[10000] P2=1534[10000] P3=13138[10000]

If i raise the threshold oclint stops completely:

Running OCLint......................................ERROR - Command 'oclint-json-compilation-database --include ../dvag/DVAGModules -- -max-priority-1 15000 -max-priority-2 15000 -max-priority-3 15000 -report-type pmd -o sonar-reports/oclint.xml' failed with error code: 245
SivaTrichy commented 9 years ago

Hi @devangpandya20 , I work with the same configurations, facing the same problem. Have you resolved it? Able to report violations? Got stuck on this. Kindly help.

KPTysonBE commented 9 years ago

Having the same Issue here.

bkottcamp commented 9 years ago

I have the same problem on:

oclint.xml has plenty of violations, from the log file:

13:23:10.182 INFO  - Sensor org.sonar.plugins.objectivec.violations.OCLintSensor@24acf051...
13:23:10.182 INFO  - Processing OCLint report /Users/developerA/MyApp/./sonar-reports/oclint.xml
13:23:10.378 ERROR - Reporting 0 violations.
13:23:10.378 INFO  - Sensor org.sonar.plugins.objectivec.violations.OCLintSensor@24acf051 done: 196 ms
zippy1978 commented 9 years ago

Hi,

Did you have a look at your quality profiles ? Do you have a provile named OCLint in the Objective C section ? If so, how many rules do you have in this profile (should be 63) ?

bkottcamp commented 9 years ago

Hi @zippy1978,

Yes I have the OCLint profile with 63 rules: screen shot 2015-06-16 at 1 21 32 pm

I've tried using the project quality profile for objective-c of Default as well as OCLint.

viteinfinite commented 9 years ago

I know it won't work for everybody, but I had the same issue and setting the OCLint profile as default fixed the problem for me.

screen shot 2015-06-19 at 11 35 27

cyupa commented 9 years ago

@mikar,@bkottcamp Have you found the solution around the 245 error code?

sarang1991 commented 8 years ago

i wrote another java file along with the plugin..and it created oclint.xml with the help of xcode, and plugin is working fine for me.

hrskrs commented 8 years ago

same issue here: ERROR - Reporting 0 violations. is logged on jenkins

sarang1991 commented 8 years ago

Instead of using this plugin, if you know how to parse the errors and give to to jenkins for listing..then easiest method is,write a java program to generate a oclint.xml..and using that file parse the erors and give those to jenkins.

bkottcamp commented 8 years ago

I am now able to get violations to show up.

Since OCLint violations weren't showing up, I switch to https://github.com/Backelite/sonar-objective-c in order to store FauxPas findings. Then I noticed that OCLint was finding violations, but they weren't being stored in the oclint.xml file. When I ran command line oclint report type text and html produced output but pmd and json did not.

I switched from OCLint 0.8.1 to OCLint 0.9 dev. At first I received the 245 error code, then I realized I had not completed the install of OCLint - I forgot the /usr/local/lib/ part of the install.

Now I'm able to see both OCLint and FauxPas findings in Sonar.

sarang1991 commented 8 years ago

Which command u executed for getting oclint report. oclint-json-compilation-database -- -report-type pmd -o oclint.xml this will give pmd .xml report

oleghnidets commented 8 years ago

It helped me https://github.com/oclint/oclint/issues/251

amin234 commented 8 years ago

hi @bkottcamp how to switched from OCLint 0.8.1 to OCLint 0.9 dev

bkottcamp commented 8 years ago

@amin234 I've now switched to OCLint 0.10.2 by installing and adding it to the path before calling run-sonar: OCLINT_HOME=/Applications/oclint/oclint-0.10.2 export PATH=$OCLINT_HOME/bin:$PATH