-
Notifications
You must be signed in to change notification settings - Fork 15.2k
Enforce Unix line endings for Clang/LLVM/MLIR projects #161460
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
Conversation
Change top-level and LLVM/MLIR/Clang `.clang-format` files to enforce unix line ending.
This is a follow on to the coding standard change and the discussion on https://discourse.llvm.org/t/llvm-source-file-line-endings/81388/16. With this, folks attempting to commit C/C++ files with non-unix line endings will see a clang-format failure in GitHub CI. Currently enabling it for just clang/llvm/mlir projects, but if this seems reasonable and sticks, we can potentially incorporate it into the |
@bogner to see if this is ok for a folks using Windows predominantly. |
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.
LGTM, but someone working on Windows should confirm. This will be good for the CI checks, but I'm not sure if this will negatively affect people's local checkouts.
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.
Windows developer here, LGTM. I have most of my tree with \n line endings and haven't seen any negative impacts.
What happens to the files that specifically require \r\n
endings for test purposes? Are these going to get mis-formatted/flagged as incorrect by clang-format?
Thanks for confirming that Windows side is fine. I assume clang-format runs only on C/C++ source files, so other files like |
Thanks, sounds good to me. |
Change top-level and LLVM/MLIR/Clang `.clang-format` files to enforce Unix line ending.
Change top-level and LLVM/MLIR/Clang
.clang-format
files to enforce Unix line ending.