diff options
author | Jonathan Miller <jonmill@microsoft.com> | 2015-09-16 21:23:19 +0300 |
---|---|---|
committer | Jonathan Miller <jonmill@microsoft.com> | 2015-09-17 02:30:33 +0300 |
commit | d27d8f7cd6dc5a492ddc90594db4d97bd833eb00 (patch) | |
tree | 1c52b33ba18c9a13e8368f81358c021708f4616e /Documentation/coding-guidelines | |
parent | 28615c2c39e9ddb3a8f419f4bc3b90e162ee530e (diff) |
Adding a clang-format file and a script to format every cpp and h file. This
style is based on the LLVM style with some minor tweaks. This commit also
ran the script against the current code to bring us into compliance. This
fixes #3051
Diffstat (limited to 'Documentation/coding-guidelines')
-rw-r--r-- | Documentation/coding-guidelines/coding-style.md | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/Documentation/coding-guidelines/coding-style.md b/Documentation/coding-guidelines/coding-style.md index a909488c69..82829f1dc7 100644 --- a/Documentation/coding-guidelines/coding-style.md +++ b/Documentation/coding-guidelines/coding-style.md @@ -1,7 +1,9 @@ C# Coding Style =============== -For non .cs files (c++, xml etc) our current best guidance is consistency. When editing files, keep new code and changes consistent with the style in the files. For new files, it should conform to the style for that component. Last, if there's a completely new component, anything that is reasonably broadly accepted is fine. +For C++ files (*.cpp and *.h), we use clang-format (version 3.6+) to ensure code styling. After changing any Cpp or H file and before merging, be sure to run ./formatCode.sh from within the Native directory; this script will ensure that all native code files adhere to the coding style guidelines. + +For non code files (xml etc) our current best guidance is consistency. When editing files, keep new code and changes consistent with the style in the files. For new files, it should conform to the style for that component. Last, if there's a completely new component, anything that is reasonably broadly accepted is fine. The general rule we follow is "use Visual Studio defaults". |