Skip to content
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

Format native code #1356

Closed
pellared opened this issue Oct 4, 2022 · 4 comments · Fixed by #2101
Closed

Format native code #1356

pellared opened this issue Oct 4, 2022 · 4 comments · Fixed by #2101
Assignees
Milestone

Comments

@pellared
Copy link
Member

pellared commented Oct 4, 2022

I propose to use clang-format for formatting the native code. I have no preference regarding what style we should use 😉

@pjanotti
Copy link
Contributor

pjanotti commented Oct 4, 2022

As long as it is consistent and has a tool to enforce it, I am in favor of it.

@pjanotti
Copy link
Contributor

pjanotti commented Oct 4, 2022

Random thought: although they probably are not the latest (or event recent) C++ standard perhaps it is worth to consider the same practices as done in dotnet/runtime for their native code.

@pjanotti pjanotti added this to the 0.5.0-beta milestone Oct 5, 2022
@pellared pellared modified the milestones: 0.5.0-beta, 0.6.0-beta, 0.7.1, 0.7.0 Nov 16, 2022
@pjanotti
Copy link
Contributor

dotnet/runtime uses clang-format to format their native sources. I like the level of control and automatic formatting capabilities. Here is the commit setting up clang-format on dotnet\runtime: dotnet/runtime@a526e77#diff-b9efd307c4085495016f2431900d62c281886557467edb33e4639406c8874477

@pellared
Copy link
Member Author

I found some helpful code here as well: https://github.com/dotnet/jitutils

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging a pull request may close this issue.

4 participants