-
Notifications
You must be signed in to change notification settings - Fork 13.3k
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
cpplint.py requires a particular python version and fails silently with a different version #132
Comments
Well, I figured out how to switch my macports install of python to version 2.7.11, and cpplint.py runs fine and produces output given that. So, progress! I guess the bug here, then, is either that (a) cpplint.py should work with later versions of python such as 3.4.4, or that (b) cpplint.py should detect emit an error message and terminate when run with versions of python with which it is not compatible. |
I have this problem too... $ find ./ -name "*.cpp" | xargs python2 ./cpplint.py
[SKIPPED]
Done processing ./2out/2out/Success.cpp
Done processing ./2out/2out/CountError.cpp
Done processing ./2out/2out/Failure.cpp
Done processing ./2out/2out/TestSuite.cpp
Total errors found: 0
$ find ./ -name "*.cpp" | xargs python ./cpplint.py
[NO OUTPUT]
$ python
Python 3.6.3 (default, Oct 3 2017, 21:45:48)
[GCC 7.2.0] on linux This python is default for ubuntu 17.10. |
Wow, 6 years passed and nobody cared to get it ready for Python 3, what a disappointment :( |
你好,你的邮件已收到,我会尽快回复。祝你工作顺利,生活愉快!
|
@GeorgeAtKistler You can use the https://github.com/cpplint/cpplint fork. |
public cpplint development in this repository has been halted (see #837). please migrate to https://github.com/cpplint/cpplint now. |
Hi. This is my first time trying to use cpplint, so my problems are likely to be clueless noob problems, sorry.
I've downloaded the whole styleguide-ghpages branch, and am now trying to run cpplint.py. If I run just the command itself (in my case, since I haven't moved it somewhere sensible yet, by typing /Users/bhaller/Desktop/styleguide-gh-pages/cpplint/cpplint.py), I get the dump of the command syntax etc., so it seems like my python install is OK, and the cpplint.py file is OK, and so forth. However, if I try to actually lint a .cpp file, I get no output at all:
darwin:
/DocumentsSynced/Research/Messer lab/SLiM project/SLiM/core bhaller $ /Users/bhaller/Desktop/styleguide-gh-pages/cpplint/cpplint.py ./slim_sim.cpp/DocumentsSynced/Research/Messer lab/SLiM project/SLiM/core bhaller $ ls -l ./slim_sim.cppdarwin:
-rw-r--r--@ 1 bhaller staff 132287 May 6 11:46 ./slim_sim.cpp
As you can see, the .cpp in question does exist. I would expect a river of error reports, since I make no effort to follow Google's C++ style. (All I want to use cpplint for is its build/include_what_you_use check.)
This is on Mac OS X. I'm using python 3.4.4, since that is what I happen to have installed:
darwin:
/DocumentsSynced/Research/Messer lab/SLiM project/SLiM/core bhaller $ which python/DocumentsSynced/Research/Messer lab/SLiM project/SLiM/core bhaller $ python --version/opt/local/bin/python
darwin:
Python 3.4.4
I don't know python at all, so I'm at a loss at to how to proceed with diagnosing the problem. Thanks for any help.
The text was updated successfully, but these errors were encountered: