-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
Prep-work for clang-format excluding \rst
-related issues.
#3087
Merged
Conversation
This file contains 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
Skylion007
reviewed
Jul 10, 2021
Skylion007
reviewed
Jul 10, 2021
rwgk
pushed a commit
to rwgk/pybind11
that referenced
this pull request
Jul 12, 2021
….cpp, test_stl.cpp
Merged
rwgk
pushed a commit
that referenced
this pull request
Jul 12, 2021
* Copying from prework_no_rst branch (PR #3087): test_numpy_array.cpp, test_stl.cpp * Manual changes reducing NOLINTs. * clang-format-diff.py * Minor adjustment to avoid MSVC warning C4702: unreachable code
This PR has a lot of merge conflicts now. I need to take care of some other things first but will come back here asap. |
…ollowed by tools/check-style.sh). * Manually moving `// NOLINT` comments so that clang-format does not move them to the wrong places. * Manually reformatting comments related to `static_assert`s so that clang-format does not need two passes. * Empty lines between #includes, to prevent clang-format from shuffling the order and thereby confusing MSVC 2015. * git diff -U0 --no-color HEAD^ | python3 $HOME/clone/llvm-project/clang/tools/clang-format/clang-format-diff.py -p1 -style=file -i
For future reference, here are a couple interesting links I found when searching for information about clang-format & |
Skylion007
approved these changes
Jul 14, 2021
henryiii
approved these changes
Jul 14, 2021
Thanks Aaron and Henry! |
rwgk
pushed a commit
to rwgk/pybind11
that referenced
this pull request
Aug 30, 2021
…he comment and empty line that was added in PR pybind#3087; those were made obsolete by the pragma cleanup that concluded with PR pybind#3186.
Merged
rwgk
pushed a commit
that referenced
this pull request
Aug 31, 2021
…nt when underlying type is bool or of char type) (#3232) * Minor tweaks. * Restoring tests/pybind11_tests.h version from master, removing just the comment and empty line that was added in PR #3087; those were made obsolete by the pragma cleanup that concluded with PR #3186. * More-to-the-point test for Python 3.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Prep-work to establish a clean base for clang-format or clang-format-diff (see experimental/demo PR #3074).
NO bulk changes in this PR, just minimal changes such that a global clang-format is stable after a single pass.
The demo PR #3074 has two automatic changes applied on top of this PR:
// clang-format off
,on
pairs around\rst
,\endrst
comment blocks.This is to prove that this prep work is the clean base we need.
This prep work was several hours of tedious work running clang-format & clang-tidy until both are stable. Breaking out as a separate PR so that these manual changes do not have to be maintained separately while we decide how to integrate clang-format or clang-format-diff into our GitHub Actions.
Notable steps:
Removing stray semicolons (discovered by running clang-format v12 followed by tools/check-style.sh).
Manually moving clang-tidy
// NOLINT
comments so that clang-format does not move them to the wrong places.Manually reformatting comments related to
static_assert
s so that clang-format does not need two passes.git diff -U0 --no-color HEAD^ | python3 $HOME/clone/llvm-project/clang/tools/clang-format/clang-format-diff.py -p1 -style=file -i
Suggested changelog entry: