Repository: mesos Updated Branches: refs/heads/master 2061b360f -> 6404a401c
Introduced ClangFormat to Mesos. Review: https://reviews.apache.org/r/26069 Project: http://git-wip-us.apache.org/repos/asf/mesos/repo Commit: http://git-wip-us.apache.org/repos/asf/mesos/commit/6404a401 Tree: http://git-wip-us.apache.org/repos/asf/mesos/tree/6404a401 Diff: http://git-wip-us.apache.org/repos/asf/mesos/diff/6404a401 Branch: refs/heads/master Commit: 6404a401ce09f36c9e072c0d17ca15c278b0f9b5 Parents: 2061b36 Author: Michael Park <[email protected]> Authored: Tue Nov 11 14:30:09 2014 -0800 Committer: Timothy Chen <[email protected]> Committed: Tue Nov 11 14:30:09 2014 -0800 ---------------------------------------------------------------------- .clang-format | 1 + support/clang-format | 105 ++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 106 insertions(+) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/mesos/blob/6404a401/.clang-format ---------------------------------------------------------------------- diff --git a/.clang-format b/.clang-format new file mode 120000 index 0000000..e7aa084 --- /dev/null +++ b/.clang-format @@ -0,0 +1 @@ +support/clang-format \ No newline at end of file http://git-wip-us.apache.org/repos/asf/mesos/blob/6404a401/support/clang-format ---------------------------------------------------------------------- diff --git a/support/clang-format b/support/clang-format new file mode 100644 index 0000000..499d0e7 --- /dev/null +++ b/support/clang-format @@ -0,0 +1,105 @@ +--- +BasedOnStyle: Google + +# Good: +# +# class Foo +# { +# public: +# +# Foo() = default; +# +# }; +# +# Bad: +# +# class Foo +# { +# public: +# +# Foo() = default; +# +# }; +# +AccessModifierOffset: -2 + +# Good: +# +# clang = Clang(); // Comment 1 +# format = Format(); // Comment 2 +# +# Bad: +# clang = Clang(); // Comment 1 +# format = Format(); // Comment 2 +# +AlignTrailingComments: false + +# Good: +# +# void F(int first, +# int second, +# int third, +# int fourth, +# int fifth, +# int sixth, +# int seventh, +# int eighth) {} +# +# Bad: +# +# void F(int first, int second, int third, int fourth, int fifth, int sixth, +# int seventh, int eighth) {} +# +BinPackParameters: false + +# Like 'Attach', but break before braces on function, namespaces, class, struct +# and union definitions. +# +BreakBeforeBraces: Linux + +# Good: +# +# class Foo +# { +# public: +# +# Foo() +# : first(1), second(2) {} +# +# }; +# +# Bad: +# +# class Foo +# { +# public: +# +# Foo() +# : first(1), second(2) {} +# +# }; +# +ConstructorInitializerIndentWidth: 2 + +# Continuation indents such as assignment statements are indented by 2 spaces. +ContinuationIndentWidth: 2 + +# Don't try to guess the pointer alignment +DerivePointerAlignment: false + +# List of foreach macros due to lack of range-based for loops. +ForEachMacros: [ foreach, foreachkey, foreachvalue, foreachpair ] + +# Maximum number of empty lines to keep. +MaxEmptyLinesToKeep: 2 + +# Good: +# +# x = 42; // Comment +# +# Bad: +# +# x = 42; // Comment +# +SpacesBeforeTrailingComments: 1 +...
