mirror of
https://github.com/facebook/sapling.git
synced 2024-12-28 15:44:27 +03:00
add .clang-format
Summary: For a while now, `arc lint` wouldn't properly format the code on Windows, the reason is due to the fact that the default sparse profile doesn't include fbcode/.clang-format. However, adding this file to the sparse profile wouldn't help as it is a symbolink link to fbsource/tools/clang-format/clang-format.ini, and as we all know, Mercurial will not create symbolic links on Windows, instead a plain file is created and its content is the link destination. The main issue with this is that clang-format simply doesn't understand what this means, and thus fails to format any code :(. Now, it turns out with recent enough version of Windows (every Windows version we support at FB do support it) being an administrator is not a requirement to create symlinks (D21258136), once this lands. I believe that once this lands, and Mercurial is taught to properly create symlinks on Windows, this change will no longer be necessary and we can revert it. In the short term, let's make our life slightly easier by copying the fbsource clang-format configuration. Reviewed By: simpkins Differential Revision: D21258015 fbshipit-source-id: 21b4fda3a28bd397244b0fc9ca730ced775e96f0
This commit is contained in:
parent
d3e2ed6ac7
commit
2da5fa967a
@ -43,12 +43,8 @@ ContinuationIndentWidth: 4
|
||||
Cpp11BracedListStyle: true
|
||||
DerivePointerAlignment: false
|
||||
DisableFormat: false
|
||||
ForEachMacros: [ FOR_EACH_RANGE, FOR_EACH, ]
|
||||
ForEachMacros: [ FOR_EACH, FOR_EACH_ENUMERATE, FOR_EACH_KV, FOR_EACH_R, FOR_EACH_RANGE, ]
|
||||
IncludeCategories:
|
||||
- Regex: '^"Edenwin.h"'
|
||||
Priority: -2
|
||||
- Regex: '^"Eden(|_string).h"'
|
||||
Priority: -1
|
||||
- Regex: '^<.*\.h(pp)?>'
|
||||
Priority: 1
|
||||
- Regex: '^<.*'
|
Loading…
Reference in New Issue
Block a user