oclint: oclint-json-compilation-database failed to generate a report

Hi,

I have oclint 0.10.2 installed on os x yosemite. When I run oclint-json-compilation-database -e Pods -v -- -report-type html -o report.html to generate a report, the output always shows:


1 error generated. 1 error generated. 3 errors generated. 1 error generated.

The generated json file ‘compile_commands.json’ passes validation on http://jsonlint.com/. Any clues where the problem is? How can I fix this issue? Thx in advance.

$ oclint -version
LLVM (http://llvm.org/):
  LLVM version 3.7.0
  Optimized build.
  Built Mar  5 2016 (18:43:14).
  Default target: x86_64-apple-darwin14.5.0
  Host CPU: broad well

OCLint (http://oclint.org/):
  OCLint version 0.10.2.
  Built Mar  5 2016 (19:12:20).

About this issue

  • Original URL
  • State: closed
  • Created 8 years ago
  • Comments: 46 (13 by maintainers)

Most upvoted comments

My solution: use “>> oclint_result.html” without ‘-o oclint_result.html’

oclint-json-compilation-database -e Pods -e React  
	-- -report-type html 
	-rc LONG_LINE=200 
	-rc LONG_VARIABLE_NAME=30
	-disable-rule ShortVariableName 
	-max-priority-1=100000 
	-max-priority-2=100000 
	-max-priority-3=100000 >> oclint_result.html

@UnrealQuester @ryuichis I found that it appear “error generated” when the project contains the assembly code.

When I integrated the binary React library to my project,the error disappeared. But if I integrate the source React library to my project, the error appeared. I found that the binary React library has not assembly files such as RCTProfileTrampoline-x86_64.S. Then, I try to delete those assembly files in source React library and reference, the error also disappeared.

I found If I remove the code “-o xx.html”, the HTML context will be wrote on terminal.

I also encounter this problem days ago, after a deep look into it. I found that it’s because the llvm version of the oclint is lower than the one of the xcode.

For example, oclint 0.12 use llvm@4, which is correspond to xcode8. When you update xcode to 9, will also update the grammer of objective-c. There is some grammer that the llvm@4 don’t support, like this one, which is supported by llvm@5, which is used in oclint 0.13.

So the best solution in my case, is to update the oclint to the lastest version. Or let’s just say, keep the llvm of both oclint and xcode corresponding to each other.

This issue will be auto-closed because there hasn’t been any activity for a few months. Feel free to open a new one if you still experience this problem.

There hasn’t been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved with the latest updates.

Please make sure to update to the latest version and check if that solves the issue. Let us know if that works for you by adding a comment.