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

No violations showing up #85

Open
devangpandya20 opened this issue Apr 28, 2015 · 16 comments
Open

No violations showing up #85

devangpandya20 opened this issue Apr 28, 2015 · 16 comments

Comments

@devangpandya20
Copy link

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
Copy link

gmdfalk commented May 10, 2015

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
Copy link

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
Copy link

Having the same Issue here.

@bkottcamp
Copy link

I have the same problem on:

  • Mac OS X 10.10.3 x86_64
  • Xcode 6.3.2
  • SonarQube Server 4.5.4
  • SonarQube Runner 2.4
  • sonar-objective-c - 0.4.0

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
Copy link

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
Copy link

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
Copy link

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
Copy link

cyupa commented Sep 2, 2015

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

@sarang1991
Copy link

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
Copy link

hrskrs commented Oct 13, 2015

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

@sarang1991
Copy link

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
Copy link

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
Copy link

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
Copy link

It helped me oclint/oclint#251

@amin234
Copy link

amin234 commented Mar 27, 2016

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

@bkottcamp
Copy link

@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

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

No branches or pull requests