-
Notifications
You must be signed in to change notification settings - Fork 12.7k
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 file #123510
Comments
I would like to add a check that follows to the LLVM style and run this check on CI. I'm uncertain about adding a check locally, since most people won't be modifying the C++ code. It would require users to install @rustbot claim |
I wonder if it would be worthwhile to build Obviously that doesn't help in cases where LLVM is downloaded (unless we also include it in the download), but maybe it's fine to skip the local check in those cases. |
As long as our C++ code doesn't introduce additional barriers to contributing to the Rust code. |
Currently, there are no clang-related builds here. Typically, we don't need to ensure that |
For Mercurial we found we had to be pretty particular about what version of |
If the cost is low, I would opt for a consistent version. In upstream LLVM practices, using version 16 of clang-format is also compatible with developing LLVM 18/19. Since we have very little C++ code, I don't think it's worth distributing clang-format. :) Of course, to ensure consistent formatting results, I will add the corresponding checks to the CI. I think we could initially implement a non-blocking CI check for a while to see if we encounter any inconsistencies. |
After some attempts, I agreed to add |
cool, thanks for implementing this! |
Originally posted by @Lambdaris in #123437 (comment)
@Zalathar mentioned we have no such automated infra in place. We have many open issues for removing this C++ code by effectively upstreaming our wrappers to LLVM, but I agree, we could start by enforcing a style.
The text was updated successfully, but these errors were encountered: