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
Non-const reference parameters are still not allowed #148
Comments
This would also be a good ticket to open at upstream https://github.com/google/styleguide/issues. Possibly the google internal cpplint version already has such a change. Generally speaking, there are multiple sources of truth here:
While I would like to make cpplint adhere to the styleguide (or the internal google cpplint version), the convention for this project is to follow the public cpplint.py for default behavior, and only add bugfixes or fixes to make cpplint useful in other contexts than google code. This is also important to be able to smoothly merge upstream changes to public google cpplint (which are not very frequent). Since users can already disable runtime/references manually, not sure if more needs to be done at this time. |
a corresponding issue at google is google#563.
the public google cpplint.py is very old and outdated. since 2019-11-19 there were no updates (apart from global replacements of recently blacklisted words such as "blacklist"). it might have been a good starting point a long time ago. but as it is not synchroneous to the public styleguide, it is (at least temporary) useless now. |
maybe you could start a 2.0 version with modern cpplint and keep 1.x.x as legacy cpplint (that way all projects that depends on this cpplint would have an option to upgrade or not). |
Any update? 😰 |
As things currently are, it seems to me that any C++ project that follows the Google C++ style guide will have to turn off I agree with @wp-seth that "the public styleguide should be seen as the base of the public modern cpplint", since that's what the vast majority of projects using |
In line with cpplint/cpplint#148
The Google C++ Style Guide seems to have allowed using non-const references as parameters, I see not reason why not to allow them here too. (runtime/references)
Relevant styleguide changes (google/styleguide@57cd341...gh-pages):
Most changes seem to come from this recent commit:
google@7a7a2f510efe7d7fc (May 20th, 2020)
The text was updated successfully, but these errors were encountered: