clang-format: force unix newlines
In order to help avoid dos-style newlines from being introduced to the
codebase, force the clang-format style to use unix-style newlines.
`DeriveLineEnding: false`:
- This disables automatic newline style detection by clang-format.
`UseCRLF: false`:
- Since detection is disabled, this enforces unix-style (LF).
Also, add a remark in the cpp-style document to codify the expectation
that unix-style newlines are used.
Tested: Apply changes to sdbusplus, run 'unix2dos' on a source file, and
confirm file is reverted to unix-style with 'clang-format'.
Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
Change-Id: Ie8f0cd956a3c52cd14891c06a0b61507f5829aaf
diff --git a/style/cpp/.clang-format b/style/cpp/.clang-format
index cab3139..945adae 100644
--- a/style/cpp/.clang-format
+++ b/style/cpp/.clang-format
@@ -49,6 +49,7 @@
ConstructorInitializerIndentWidth: 4
ContinuationIndentWidth: 4
Cpp11BracedListStyle: true
+DeriveLineEnding: false
DerivePointerAlignment: false
PointerAlignment: Left
DisableFormat: false
@@ -110,6 +111,7 @@
SpacesInSquareBrackets: false
Standard: Latest
TabWidth: 4
+UseCRLF: false
UseTab: Never
...