sonar-objective-c
sonar-objective-c copied to clipboard
oclint.xml not found.!
I am using objective-c plugin from github in sonar.In my project directory sonar-report/oclint is not created, when i executing sonar-runner. So that in sonar no violations listed. But when i manually executing commands like xcodebuild clean build > xcodebuild.log
oclint-xcodebuild
oclint-json-compilation-database -- -report-type pmd -o oclint.xml
i got oclint.xml. then i created a sonar-report folder in project directory and pasted oclint.xml. Then i got violations listed in my sonar. why file not found exception occures ? why no folder created ? how can i execute above three commands to generate oclint.xml ? wher to add those commands? please give your valuable suggestions.
having same issue here
hi,What error you are getting ?i resolved my issues.
Hi, i am getting same error:
Error processing file named /Users/Shared/Jenkins/Home/jobs/Sample App/workspace/sonar-reports/oclint.xml java.io.FileNotFoundException: /Users/Shared/Jenkins/Home/jobs/Sample App/workspace/sonar-reports/oclint.xml (No such file or directory)
link:http://stackoverflow.com/questions/33040509/error-processing-oclint-xml-on-jenkins
Do onething. go to project directory where .xcodeproj exist.and then execute following commands.
=> xcodebuild clean build CODE_SIGN_IDENTITY=" " CODE_SIGNING_REQUIRED=NO > xcodebuild.log
=> oclint-xcodebuild -output compile_commands.json xcodebuild.log
=> oclint-json-compilation-database -- -max-priority-1 99999 -max-priority-2 99999 -max-priority-3 99999 -report-type pmd -o oclint.xml
let me know which are the files you are getting .
after executing:
=> xcodebuild clean build CODE_SIGN_IDENTITY=" " CODE_SIGNING_REQUIRED=NO > xcodebuild.log
It shows these errors:
The following build commands failed: Ld build/SampleApp.build/Release-iphoneos/SampleApp.build/Objects-normal/arm64/SampleApp normal arm64 Ld build/SampleApp.build/Release-iphoneos/SampleApp.build/Objects-normal/armv7/SampleApp normal armv7
I will do a clean setup of the project and will try your suggestion though
did you get xcodebuild.log file ??
yeap i do get it. I tried proceeding further by executing second line and it generated compile_commands.json. However after i executed the third one it started to generate something(ex: 23 errors generated, 2 errors generated...) but it didn't generate oclint.xml report file
try this oclint-json-compilation-database -- -report-type pmd -o oclint.xml
nope it won't generate oclint.xml file
you got xcodebuild.log and compile_commands.json files ,huh ? try this plugin...
https://github.com/sarang1991/Sonar-Objective-C-plugin.git
yeah i got them but not oclint.xml
did you have OClint installed in your pc ??
yeah ofc Oclint 0.8.1. fyi: Installed it with brew
installed using these commands ??
- brew install caskroom/cask/brew-cask
- brew cask install oclint
nope, i installed through gist link provided: brew install 'gist oclint formula link'
i hope it is an error of your current oclint.can you try to install using abouve commands ?
Installed and tried but it still won't generate clint.xml. Can it be related with cocoa framework? Project i am trying to analyse is using Cocoa Framework?
can you share the compile_commands.json file ?
Oclint.xml has been created after some tries. Ill try to analyze and update you with info
https://groups.google.com/forum/#!topic/oclint-users/5O-M868dq34
It is Reporting 0 violations now. Oclint.xml file is not being populated probably somehow. No violations are shown in Sonar. Probably same issue as here: https://github.com/octo-technology/sonar-objective-c/issues/85