You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This issue stands as proposal to automate code formatting throughout the OpenJ9 codebase, using a tool like clang-format.
On the OMR side, work is being done towards automated formatting using clang-format with integration into the CI pipeline. This current proposal builds off that work and a previous OMR proposal.
Both of those issues contain valuable discussions that are worth reading, and much of it applies here. Without belabouring the points made therein, here are what I believe to be benefited the most by using such a tool:
Reading
Automated formatting produces more readable code; one knows what to expect. The selected format likely will not be anyone's favourite, but it will at least be enforced consistently.
Writing
One need not spend time to ensure proper formatting manually. clang-format integrates well with IDEs and editors to format-on-save, and if not integrated, can be simply run from the command line, and easily integrated into a CI pipeline.
Reviewing
An automated formatting tool reduces reviewer and author overhead by removing virtually all formatting related comments, allowing the review to focus on semantics of the proposed change, speeding up the reviewing/addressing cycle, and reducing the time-to-merge.
Goals
Format the C/C++ codebase in its entirety, or a selected set of directories, using clang-format
Add automation via GitHub hooks to validate code format of every commit within a PR
Provide optional git hooks that enable automatic formatting of a git commit
Provide instructions on setting up clang-format on the most popular code editors (VSCode, vim/nvim, emacs, eclipse, etc.)
Minimize spending reviewer/author resources on any stylistic PR comments and allow us to focus on the semantics of the patch
This issue will serve as a forum of discussion and sharing opinion. Feel free to voice concerns, support, and suggestions.
The text was updated successfully, but these errors were encountered:
This issue stands as proposal to automate code formatting throughout the OpenJ9 codebase, using a tool like clang-format.
On the OMR side, work is being done towards automated formatting using clang-format with integration into the CI pipeline. This current proposal builds off that work and a previous OMR proposal.
Both of those issues contain valuable discussions that are worth reading, and much of it applies here. Without belabouring the points made therein, here are what I believe to be benefited the most by using such a tool:
Reading
Writing
clang-format
integrates well with IDEs and editors to format-on-save, and if not integrated, can be simply run from the command line, and easily integrated into a CI pipeline.Reviewing
Goals
This issue will serve as a forum of discussion and sharing opinion. Feel free to voice concerns, support, and suggestions.
The text was updated successfully, but these errors were encountered: