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

oclint.xml not found.! #91

Open
sarang1991 opened this issue Jul 9, 2015 · 21 comments
Open

oclint.xml not found.! #91

sarang1991 opened this issue Jul 9, 2015 · 21 comments

Comments

@sarang1991
Copy link

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.

@hrskrs
Copy link

hrskrs commented Oct 12, 2015

having same issue here

@sarang1991
Copy link
Author

hi,What error you are getting ?i resolved my issues.

@hrskrs
Copy link

hrskrs commented Oct 13, 2015

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

@sarang1991
Copy link
Author

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 .

@hrskrs
Copy link

hrskrs commented Oct 13, 2015

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

@sarang1991
Copy link
Author

did you get xcodebuild.log file ??

@hrskrs
Copy link

hrskrs commented Oct 13, 2015

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

@sarang1991
Copy link
Author

try this
oclint-json-compilation-database -- -report-type pmd -o oclint.xml

@hrskrs
Copy link

hrskrs commented Oct 13, 2015

nope it won't generate oclint.xml file

@sarang1991
Copy link
Author

you got xcodebuild.log and compile_commands.json files ,huh ?
try this plugin...

https://github.com/sarang1991/Sonar-Objective-C-plugin.git

@hrskrs
Copy link

hrskrs commented Oct 13, 2015

yeah i got them but not oclint.xml

@sarang1991
Copy link
Author

did you have OClint installed in your pc ??

@hrskrs
Copy link

hrskrs commented Oct 13, 2015

yeah ofc Oclint 0.8.1. fyi: Installed it with brew

@sarang1991
Copy link
Author

installed using these commands ??

  1. brew install caskroom/cask/brew-cask
  2. brew cask install oclint

@hrskrs
Copy link

hrskrs commented Oct 13, 2015

nope, i installed through gist link provided:
brew install 'gist oclint formula link'

@sarang1991
Copy link
Author

i hope it is an error of your current oclint.can you try to install using abouve commands ?

@hrskrs
Copy link

hrskrs commented Oct 13, 2015

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?

@sarang1991
Copy link
Author

can you share the compile_commands.json file ?

@hrskrs
Copy link

hrskrs commented Oct 13, 2015

Oclint.xml has been created after some tries. Ill try to analyze and update you with info

@sarang1991
Copy link
Author

@hrskrs
Copy link

hrskrs commented Oct 13, 2015

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: #85

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

2 participants