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.
Follow-on to PR #3051 by @Skylion007 .
NOTE: This PR only changes C++ test code. Python test code and production C++ code are completely unaffected.
This PR removes most
NOLINT
comments, changing the C++ test code instead to resolve the clang-tidy errors.All changes are of this form:
The only noteworthy special case is a change of the following kind in test_exceptions.cpp, which is to avoid a MSVC (all versions) warning about unreachable code:
This PR reduces the occurrence of
NOLINT
in the pybind11 repo from 103 to 22. Most of the rest need to stay, a handful could maybe changed meaningfully but will require corresponding changes in the Python test code (beyond the scope of this PR / best handled in separate PRs).See also: #3087 (comment)
clang-tidy-diff was applied.
Additional comprehensive Google-internal testing (identical observations for PR applied to
master
andsmart_holder
branch):Note: Google-global testing was not run but is pointless in this case, because all changes are in pybind11/tests only.