-
-
Notifications
You must be signed in to change notification settings - Fork 310
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
Add clang-format #1086
Merged
Merged
Add clang-format #1086
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
louwers
commented
Apr 30, 2023
louwers
commented
Apr 30, 2023
louwers
commented
Apr 30, 2023
louwers
commented
Apr 30, 2023
louwers
commented
Apr 30, 2023
OK the So I am going to revert that. |
ovivoda
approved these changes
May 1, 2023
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great effort @louwers !
TimSylvester
added a commit
that referenced
this pull request
May 2, 2023
* commit '958cdb82067cc16c2e7a6746b24221240d3e7927': [pre-commit.ci] pre-commit autoupdate (#1096) Add clang-format (#1086) Update paths from maplibre-gl-native to maplibre-native (#1090) Revert GLES3 changes for OSMesa in Windows (#1079) [cmake] Use MLN prefix instead of MBGL (#1054) Create security policy (#1080) Adjust trivial links to maplibre-native (#1083) # Conflicts: # include/mbgl/gfx/shader.hpp # src/mbgl/gfx/vertex_buffer.hpp # src/mbgl/gl/context.cpp # src/mbgl/gl/vertex_array.hpp # src/mbgl/renderer/layers/render_background_layer.cpp # src/mbgl/renderer/render_orchestrator.cpp # src/mbgl/renderer/render_orchestrator.hpp
TimSylvester
added a commit
that referenced
this pull request
May 3, 2023
* topic/drawable: (21 commits) build issues [pre-commit.ci] auto fixes from pre-commit.com hooks order drawables [pre-commit.ci] auto fixes from pre-commit.com hooks refactor [pre-commit.ci] pre-commit autoupdate (#1096) Add clang-format (#1086) Move generic shader lookup to context virtual Update paths from maplibre-gl-native to maplibre-native (#1090) missing includes warnings warnings warnings Eliminate GL drawable/builder dependencies from generic background layer Missing include Evaluate and apply color Revert GLES3 changes for OSMesa in Windows (#1079) [cmake] Use MLN prefix instead of MBGL (#1054) warnings Create security policy (#1080) ...
ntadej
pushed a commit
to ntadej/maplibre-native
that referenced
this pull request
May 6, 2023
Co-authored-by: mwilsnd <mwilsnd@gmail.com>
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.
I tried to use clang-unformat to generate a config that best matches the code base.
However there is not a lot of consistency, so I got mixed results.
I made some minor changes, I kept
AllowShortFunctionsOnASingleLine
, disabledPackConstructorInitializers
andAllowShortEnumsOnASingleLine
. I setAlignAfterOpenBracket
toBlockIndent
(makes it a bit easier to move arguments around since together withBinPackArguments
disabled every argument will be on its own line):https://clang.llvm.org/docs/ClangFormatStyleOptions.html#alignafteropenbracket
I also added a
PenaltyBreakAssignment
, which for example better worked here:static const auto geomPolygon =
Polygon{
...
pre-commit run --all-files