-
Notifications
You must be signed in to change notification settings - Fork 15.2k
[CodingStandard] Require Unix line endings for all files #161228
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
Require all C/C++ source files to use Unix style line endings. This is just formalizing an already loosely followed convention and not doing so can cause build failure for some downstream clients of LLVM.
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.
Adding clang-format checks seems like a good next step, but I don't see any reason to block landing this on that.
Thanks. I'll leave it open for a few days for folks to comment (here or in the thread). |
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.
+1 to the general idea, but as nikic has mentioned, it's my understanding that the line endings should be \n for all cases except for a few very specific exceptions, which probably don't need enumerating in the coding standard (assuming they are obvious from the specific contexts, i.e. the tests that rely on line endings).
eb26b62
to
e93fcfe
Compare
I also removed the use of the word "style" as just using Unix line endings is sufficient. |
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
e93fcfe
to
985ef74
Compare
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 you should change the PR title and description to remove the use of "source" too, so that it doesn't appear in the commit message.
Done. |
LLVM Buildbot has detected a new failure on builder Full details are available at: https://lab.llvm.org/buildbot/#/builders/18/builds/21609 Here is the relevant piece of the build log for the reference
|
Require all files to use Unix line endings, formalizing an already followed convention.
Require all files to use Unix line endings, formalizing an already followed convention.