I am trying to get the list of warnings,errors,syntax coding convention and cyclomatic complexity from command line. I found that oclint can be used for my purpose. but then I ran into a problem
What I tried to do.
xcodebuild -project testing.xcodeproj -target "testing" -configuration "Debug" -destination "platform=iOS Simulator,name=iPad" -sdk "iphonesimulator7.0" -IDEBuildOperationMaxNumberOfConcurrentCompileTasks=8 clean
xcodebuild -project testing.xcodeproj -target "testing" -configuration "Debug" -destination "platform=iOS Simulator,name=iPad" -sdk "iphonesimulator7.0" -IDEBuildOperationMaxNumberOfConcurrentCompileTasks=8 build |tee xcodebuild.log
oclint-xcodebuild xcodebuild.log
till here everything went fine and even compile_commands.json was created correctly.
but when I ran oclint-json-compilation-database
then I am getting this error.
I read from here that i must use oclint [-enable-clang-static-analyzer]
after the above command succeeds
If anyone knows how to solve this or have a better solution for my requirement Please let me know
EDIT:
if I use clint [-enable-clang-static-analyzer -R /usr/lib/oclint/rules ]
then I am getting the error oclint: error: cannot find dynamic library for report type: text
Found my problem. posting the solution as it can help some one.
My problem is, i cloned the repository and pasted the script files in usr/local/lib manually and that somehow is not right!. what I did is removed those and did a brew install.
here is the command
Thanks