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-json-compilation-database] OSError: [Errno 7] Argument list too long #233

Open
runv opened this issue Mar 23, 2015 · 5 comments
Open

Comments

@runv
Copy link

runv commented Mar 23, 2015

When I invoke on the objective c project with a lot of files
oclint-json-compilation-database -v -debug -- -report-type pmd -o sonar-reports/oclint.xml

I get error:
File "/opt/oclint-0.8.1/bin/oclint-json-compilation-database", line 85, in
exit_code = subprocess.call(oclint_invocation, shell=True)
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/subprocess.py", line 522, in call
return Popen(_popenargs, *_kwargs).wait()
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/subprocess.py", line 710, in init
errread, errwrite)
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/subprocess.py", line 1335, in _execute_child
raise child_exception
OSError: [Errno 7] Argument list too long

Is it possible somehow to add support of xargs? Or any other solution for this problem?

@GeekMin
Copy link

GeekMin commented Apr 28, 2015

hey, boy...just now I meet with this problem.. do you get some solutions for this~? [Argument too long] I am finding now~

@runv
Copy link
Author

runv commented Apr 30, 2015

Hi GeekMin, the only solution I found is to divide compile_commands.json file on smaller parts and call oclint-json-compilation-database on this smaller files.

@wuwen1030
Copy link

I give a solution here. Hope that can help you.

@ryuichis
Copy link
Contributor

@wuwen1030 I like the solution!!! Thinking what's the best approach to deliver the message to other users who face similar issues, any suggestions? Or do you think if there is a way you can incorporate your solution into oclint-json-compilation-database? In addition, I believe by tweaking your solution a little bit further, you can invoke oclint with multiple threads for getting results faster, but this can be addressed later.

By the way, I can't help think of https://en.wikipedia.org/wiki/Rent_Is_Too_Damn_High_Party by reading your repo name. ;)

@taehoon-jung
Copy link

@wuwen1030 Thank you very much! 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants