sonar-objective-c icon indicating copy to clipboard operation
sonar-objective-c copied to clipboard

OClint error code 245

Open quantumarun opened this issue 9 years ago • 18 comments

Hi, I am getting error while running the analysis on one of our project using ./run-sonar.sh. The analysis is crashing at OCLint and exiting with error code 245. I had checked on OCLint and there seems to be no such error code for failure. Does OCLint have limit to the number of issues after which it stops the execution. Also this does not create any reports in Sonar Qube. For few of the projects report is getting generated in Sonar Qube.

Running OCLint... Path included in oclint analysis is: --include .*/abc/Test

  • oclint-json-compilation-database --include ../abc/Test -- -max-priority-1 100000 -max-priority-2 100000 -max-priority-3 100000 -report-type pmd -o sonar-reports/oclint.xml
  • returnValue=245
  • set +x ERROR - Command 'oclint-json-compilation-database --include ../abc/Test -- -max-priority-1 100000 -max-priority-2 100000 -max-priority-3 100000 -report-type pmd -o sonar-reports/oclint.xml' failed with error code: 245

Please help me in resolving this.

quantumarun avatar Sep 30 '15 05:09 quantumarun

Has anyone encountered such issue?

quantumarun avatar Oct 06 '15 12:10 quantumarun

Hi quantumarun - I've been seeing this too but have no leads yet on why oclint-json-compilation-database returns a 245.

smacgregor avatar Oct 09 '15 00:10 smacgregor

Hi, include FileSearch.java, ObjectiveCStartup.java inside

/src/main/java/org/sonar/plugins/objectivec/

https://github.com/sarang1991/Sonar-Objective-C-plugin/blob/master/src/main/java/org/sonar/plugins/objectivec/FileSearch.java

https://github.com/sarang1991/Sonar-Objective-C-plugin/blob/master/src/main/java/org/sonar/plugins/objectivec/ObjectiveCStartup.java

sarang1991 avatar Oct 13 '15 10:10 sarang1991

Hi Sarang, Thanks for your comment. It seems ObjectiveCStartup.java is missing.

quantumarun avatar Oct 13 '15 10:10 quantumarun

Updated..sorry ;)

sarang1991 avatar Oct 13 '15 10:10 sarang1991

Thanks let me try with these steps.

quantumarun avatar Oct 13 '15 10:10 quantumarun

Sarang, There is no objecive-c folder under sonarqube plugin's

here is my Sonarqube directory structure: image

quantumarun avatar Oct 13 '15 10:10 quantumarun

no brother..it is visible in git repo, after cloning

https://github.com/octo-technology/sonar-objective-c.git

sarang1991 avatar Oct 13 '15 10:10 sarang1991

I am not using git, i have directly downloaded the jar file from http://bit.ly/18A7OkE. How to use above files then.

quantumarun avatar Oct 13 '15 10:10 quantumarun

create a new account first..then try...no other solution to get i think.

sarang1991 avatar Oct 13 '15 10:10 sarang1991

I don't see the the files at below Git repo: https://github.com/octo-technology/sonar-objective-c.git

Also at below repo: https://github.com/sarang1991/Sonar-Objective-C-plugin How will i get the jar file generated.

quantumarun avatar Oct 13 '15 12:10 quantumarun

https://github.com/octo-technology/sonar-objective-c.git goto this link...clone the project.open in any java IDE,copy above files to the directory specified..and mavan install.you wil get a jar file on Target folder inside project dir.copy and paste jar file to sonar plugin directory.

sarang1991 avatar Oct 14 '15 03:10 sarang1991

Hi, I was able to generate the Jar from above instructions and it worked of one of my project but still for other project it throws the same error. Any help in fixing this

.... Skipping tests as no test scheme has been provided! Running OCLint... Path included in oclint analysis is: --include .*/abc/Test

  • oclint-json-compilation-database --include ../abc/Test -- -max-priority-1 100000 -max-priority-2 100000 -max-priority-3 100000 -report-type pmd -o sonar-reports/oclint.xml
  • returnValue=245
  • set +x ERROR - Command 'oclint-json-compilation-database --include ../abc/Test -- -max-priority-1 100000 -max-priority-2 100000 -max-priority-3 100000 -report-type pmd -o sonar-reports/oclint.xml' failed with error code: 245

quantumarun avatar Nov 04 '15 06:11 quantumarun

What error you are getting ??? file not found or something else ??? U should modify sonar-project.properties in your sonar based on the format specified inside sonar-objective-c/sample/

sarang1991 avatar Nov 05 '15 05:11 sarang1991

error code 245. sonar-project.properties file seems fine.

quantumarun avatar Nov 05 '15 10:11 quantumarun

Do check your Quality profile tab in sonarqube main window..and make sure that under Objective-C Profiles there is OCLint.otherwise add it, and your database connectivity.

sarang1991 avatar Nov 06 '15 04:11 sarang1991

OCLint is there in the profiles tab. Also i am using Embedded Database if that can help. Check the bottom of the image.

image

quantumarun avatar Nov 06 '15 10:11 quantumarun

same error code, after rebuild jar package

galenzhao avatar May 16 '16 02:05 galenzhao