-
Notifications
You must be signed in to change notification settings - Fork 1.6k
cpplint.py: disable obsolete warnings for c++11 and c++14 features #14320
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…been since #10651 which was merged almost 2 years ago)
This library was deprecated in Python 3.11 (https://docs.python.org/3/whatsnew/3.11.html#modules) and is pending complete removal some time after Python 3.13 (https://docs.python.org/3/whatsnew/3.13.html#pending-removal-in-future-versions).
…ting custom literals. For example, the standard library encourages "using namespace" like: ``` using namespace std::literals::chrono_literals (since C++14) using namespace std::literals::complex_literals (since C++14) using namespace std::literals::string_literals (since C++14) using namespace std::literals::string_view_literals (since C++17) ``` so those shouldn't result in lint errors. See https://en.cppreference.com/w/cpp/symbol_index/literals
…lint.py is changed." This reverts commit bb3b0f3.
…d/c++tr1 This fixes the bogus lint errors like this: Unknown NOLINT error category: build/c++11 [readability/nolint] [5]
…they're doing what I think they're doing.
…t.py _ignores_ (rather than fails) when this lint warning is suppressed.
paulb777
approved these changes
Jan 13, 2025
# for free
to subscribe to this conversation on GitHub.
Already have an account?
#.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR removes c++11 and c++14 lint checks, as the floor is c++14 (and has been for almost 2 years, since the merge of #10651). cpplint.py appears to have been written pre-c++11 and has not been updated to fully accept c++11 and c++14 features.
This change will improve the readability of code in this repo by removing the need to unnecessarily sprinkle comments like
// NOLINT(build/c++11)
all over the place.This PR makes the following changes to cpplint.py:
using namespace
declarations to allow for such declarations for the purpose of bringing custom literals into scope, a case whereusing namespace
declarations are generally accepted.sre_compile
Python module.#no-changelog