Conversation
In the process of bumping OSL to clang-format 22, mirroring the change we made here in OIIO a few weeks back, I spent some time reconciling the differences that had accumulated between the .clang-format of the two projects. I looked at every difference, and one at a time, I tried reformatting each project with the other's choice for that line, looking at the diffs and deciding which I actually liked better. Sometimes OIIO won, sometimes OSL. Sometimes I liked the OIIO for OIIO and OSL for OSL, despite differences in style. Anyway, this PR is the set of changes to OIIO's .clang-format that I felt like I aesthetically preferred the results as they had been implemented in OSL. This is a matter of taste, and not everyone will agree. You might argue that even if it's nicer, it's not worth the code churn. Fair point. But in this case, I think that there is also merit for the two projets to share a formatting style to the greatest degree possible, and to periodically synchronize their .clang-format choices. Note that we expect this PR to fail the clang-format CI job, because this patch is JUST the changes to .clang-format, and not the reformatted code (though you can preview it by looking at the failed test CI logs), and I will post a subsequent review of the actual code format changes. Signed-off-by: Larry Gritz <lg@larrygritz.com>
Collaborator
Author
|
Any objections? |
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
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.
In the process of bumping OSL to clang-format 22, mirroring the change we made here in OIIO a few weeks back, I spent some time reconciling the differences that had accumulated between the .clang-format of the two projects.
I looked at every difference, and one at a time, I tried reformatting each project with the other's choice for that line, looking at the diffs and deciding which I actually liked better. Sometimes OIIO won, sometimes OSL. Sometimes I liked the OIIO for OIIO and OSL for OSL, despite differences in style.
Anyway, this PR is the set of changes to OIIO's .clang-format that I felt like I aesthetically preferred the results as they had been implemented in OSL.
This is a matter of taste, and not everyone will agree. You might argue that even if it's nicer, it's not worth the code churn. Fair point. But in this case, I think that there is also merit for the two projets to share a formatting style to the greatest degree possible, and to periodically synchronize their .clang-format choices.
Note that we expect this PR to fail the clang-format CI job, because this patch is JUST the changes to .clang-format, and not the reformatted code (though you can preview it by looking at the failed test CI logs), and I will post a subsequent review of the actual code format changes.