styleguide icon indicating copy to clipboard operation
styleguide copied to clipboard

Add python 3 support to cpplint and cpplint_unittest

Open m-chaturvedi opened this issue 5 years ago • 7 comments

m-chaturvedi avatar Feb 26 '20 20:02 m-chaturvedi

@vapier I was making these changes to the tests for our internal cpplint which already has support for python3. I realized that I need to change the corresponding cpplint.py here as well.

We need to substitute assertEquals with assertEqual and assert_ with assertTrue to remove the deprecation warnings (will make another PR once / if this is accepted): https://docs.python.org/3.3/library/unittest.html#deprecated-aliases

m-chaturvedi avatar Feb 27 '20 21:02 m-chaturvedi

@markmentovai what's the story with cpplint in this repo ? is this the master copy ? or is it in google3 ? or is it cpplint/cpplint ?

vapier avatar Feb 27 '20 22:02 vapier

cpplint here was maintained by @eglaysher while he was at Google, and hasn’t seen much action since.

I didn’t know anything about cpplint/cpplint until moments ago.

markmentovai avatar Feb 28 '20 01:02 markmentovai

I have pointed others who have come along at the https://github.com/cpplint/cpplint community maintained one as well due to lack of traction in getting any of us to maintain the version in this repo.

Googlers: internally our devtools/cpplint/ version has been updated to use Python 3. I believe all that needs is a copybara config setup to export it+test to this repo from time to time. For an example of how to set that up, code search internally for config/pylint_only/copy.bara.sky.

Alternatively, if we're not going to maintain the version here I suggest deleting it and officially pointing external users at the aformentioned cpplint project.

gpshead avatar Feb 28 '20 05:02 gpshead

if we do have an internal copy to publish from, then publishing it here would be helpful. i think i've had it come up with other public repos that we wanted updated cpplint scripts.

vapier avatar Feb 28 '20 12:02 vapier

It’s just a question of ownership. If there are internal owners for cpplint, it’d be best for them to be involved in the process. But even if we can’t get that, if someone’s willing to do it best-effort (as Elliot had been doing) or even as a one-off, it’d be an improvement.

markmentovai avatar Feb 28 '20 15:02 markmentovai