oclint-xcodebuild | helper program that converts xcodebuild log | iOS library
kandi X-RAY | oclint-xcodebuild Summary
kandi X-RAY | oclint-xcodebuild Summary
!!! This project is no longer under maintenance by OCLint team! Please consider using xcpretty (Basically, if your command looks like this. Then replace it with. xcodebuild | xcpretty -r json-compilation-database. Since OCLint recognizes a file called compile_commands.json to figure out the compiler options for parsing each file, oclint-xcodebuild is a helper program that converts xcodebuild log to compile_commands.json. Visit for documentation about using oclint-xcodebuild.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of oclint-xcodebuild
oclint-xcodebuild Key Features
oclint-xcodebuild Examples and Code Snippets
Community Discussions
Trending Discussions on oclint-xcodebuild
QUESTION
I am trying to integrate OCLint 0.13 to check lint violations in my ObjC based iOS project.
As per this guide I created an aggregate target in Xcode to run a xcodebuild clean build
followed by oclint-xcodebuild
to generate a compile_commands.json
. I am able to run the clang
command from the generated compile_commands.json
file. However, in html report generated by oclint-json-compilation-database
command, while processing file like NEORepos/Public/ResourceObservables/NEOAggregatedObservable.h
, I see compiler errors like 'NEOObservables/NEOObservable.h' file not found
even though the said header file is present at NEOObservables/Public/Observables/NEOObservable.h
.
How can I get rid of these compiler errors which are preventing some of my source files from being linted?
Running the clang command from compile_commands.json
generates the .o
file, but OCLint doesn't seem to be able to compile using the json file.
I also tried adding a few more -I
include paths, but it didn't help. All suggestions and pointers are welcome.
Here's a piece of (edited) log...
...xcode_clean_build_command = xcodebuild -workspace 'Neo.xcworkspace' -scheme 'NeoSampleApp' -configuration 'Debug' clean build -dry-run -derivedDataPath /Users/username/Documents/git/ios-neo_linter/build/Neo -sdk iphonesimulator CLANG_ENABLE_MODULE_DEBUGGING=NO CODE_SIGNING_ALLOWED=NO CODE_SIGN_IDENTITY='' CODE_SIGNING_REQUIRED=NO ENABLE_BITCODE=NO COMPILER_INDEX_STORE_ENABLE=NO | tee xcodebuild.log
...
/oclint-xcodebuild
...
Generating the compile_commands.json ...
Picking NEORepos/Public/ResourceObservables/NEOAggregatedObservable.m Picking NeoSampleApp/main.m
...
Shortlisted files for linting (2 out of 283) and creating a new compile_commands.json
...
Compiling /Users/username/Documents/git/ios-neo_linter/NEORepos/Public/ResourceObservables/NEOAggregatedObservable.m - Failed Compiling /Users/username/Documents/git/ios-neo_linter/NeoSampleApp/main.m - Success Analyzing /Users/username/Documents/git/ios-neo_linter/NeoSampleApp/main.m - Done
...
Generating lint report (if any)...
...
Executing command: oclint-json-compilation-database -e Pods -v -- -list-enabled-rules -no-analytics -enable-global-analysis -verbose --report-type html -o oclint.html -extra-arg=-Wno-everything
...
/usr/local/bin/oclint -p /Users/username/Documents/git/ios-neo_linter -list-enabled-rules -no-analytics -enable-global-analysis -verbose --report-type html -o oclint.html -extra-arg=-Wno-everything /Users/username/Documents/git/ios-neo_linter/NEORepos/Public/ResourceObservables/NEOAggregatedObservable.m /Users/username/Documents/git/ios-neo_linter/NeoSampleApp/main.m
ANSWER
Answered 2018-Mar-02 at 19:00The compiler error was due to the -dry-run
flag that I was using. Since it was doing a dry run, it was not creating .hmap
files that were needed (at least not in the right location) leading to .h file not found
errors.
However, without -dry-run
I would have to do a full build which is not acceptable for me. Will update if I find a solution with optimal performance.
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install oclint-xcodebuild
You can use oclint-xcodebuild like any standard Python library. You will need to make sure that you have a development environment consisting of a Python distribution including header files, a compiler, pip, and git installed. Make sure that your pip, setuptools, and wheel are up to date. When using pip it is generally recommended to install packages in a virtual environment to avoid changes to the system.
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page