You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mesos.apache.org by bb...@apache.org on 2017/10/09 13:48:00 UTC

mesos git commit: Formatted 'synchronized' like loop instead of function.

Repository: mesos
Updated Branches:
  refs/heads/master 5e5ed4db2 -> 4fd018be6


Formatted 'synchronized' like loop instead of function.

We typically format 'synchronized' like a loop, i.e., we prefer

    // Loop-like formatting.
    synchronized (lock) {
      // Body.
    }

over e.g.,

    // Function-like formatting.
    synchronized(lock)
    {
      // Body.
    }

This patch updates the clang-format configuration to treat
'synchronized' blocks like loops instead of functions. This just
codifies the existing convention in the code, so that this is a NFC.

Review: https://reviews.apache.org/r/62804/


Project: http://git-wip-us.apache.org/repos/asf/mesos/repo
Commit: http://git-wip-us.apache.org/repos/asf/mesos/commit/4fd018be
Tree: http://git-wip-us.apache.org/repos/asf/mesos/tree/4fd018be
Diff: http://git-wip-us.apache.org/repos/asf/mesos/diff/4fd018be

Branch: refs/heads/master
Commit: 4fd018be674ad6badd23f6a1f0baea2d63fd7974
Parents: 5e5ed4d
Author: Benjamin Bannier <bb...@apache.org>
Authored: Mon Oct 9 15:03:06 2017 +0200
Committer: Benjamin Bannier <bb...@apache.org>
Committed: Mon Oct 9 15:45:03 2017 +0200

----------------------------------------------------------------------
 support/clang-format | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/mesos/blob/4fd018be/support/clang-format
----------------------------------------------------------------------
diff --git a/support/clang-format b/support/clang-format
index bb58702..1fb2ac4 100644
--- a/support/clang-format
+++ b/support/clang-format
@@ -34,7 +34,7 @@ Cpp11BracedListStyle: true
 DerivePointerAlignment: false
 DisableFormat:   false
 ExperimentalAutoDetectBinPacking: false
-ForEachMacros:   [ foreach, foreachkey, foreachvalue, foreachpair ]
+ForEachMacros:   [ foreach, foreachkey, foreachvalue, foreachpair, synchronized ]
 IncludeCategories:
   - Regex:           '^<.*\.h>'
     Priority:        1