You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mesos.apache.org by me...@apache.org on 2014/10/14 07:57:06 UTC

[1/2] git commit: NOLINT a few operator overloads, to enable whitespace/operators

Repository: mesos
Updated Branches:
  refs/heads/master 5d5b65e57 -> eaf703abc


NOLINT a few operator overloads, to enable whitespace/operators

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


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

Branch: refs/heads/master
Commit: 68959c5496f7c185f41f429fa91b441ecea87cac
Parents: 5d5b65e
Author: Adam B <ad...@mesosphere.io>
Authored: Mon Oct 13 22:52:04 2014 -0700
Committer: Adam B <ad...@mesosphere.io>
Committed: Mon Oct 13 22:52:04 2014 -0700

----------------------------------------------------------------------
 3rdparty/libprocess/include/process/metrics/counter.hpp | 4 ++--
 3rdparty/libprocess/include/process/pid.hpp             | 2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/mesos/blob/68959c54/3rdparty/libprocess/include/process/metrics/counter.hpp
----------------------------------------------------------------------
diff --git a/3rdparty/libprocess/include/process/metrics/counter.hpp b/3rdparty/libprocess/include/process/metrics/counter.hpp
index 6800e7a..fde05ae 100644
--- a/3rdparty/libprocess/include/process/metrics/counter.hpp
+++ b/3rdparty/libprocess/include/process/metrics/counter.hpp
@@ -37,12 +37,12 @@ public:
     push(__sync_and_and_fetch(&data->v, 0));
   }
 
-  Counter& operator ++ ()
+  Counter& operator ++ () // NOLINT(whitespace/operators)
   {
     return *this += 1;
   }
 
-  Counter operator ++ (int)
+  Counter operator ++ (int) // NOLINT(whitespace/operators)
   {
     Counter c(*this);
     ++(*this);

http://git-wip-us.apache.org/repos/asf/mesos/blob/68959c54/3rdparty/libprocess/include/process/pid.hpp
----------------------------------------------------------------------
diff --git a/3rdparty/libprocess/include/process/pid.hpp b/3rdparty/libprocess/include/process/pid.hpp
index fbd512f..2345322 100644
--- a/3rdparty/libprocess/include/process/pid.hpp
+++ b/3rdparty/libprocess/include/process/pid.hpp
@@ -41,7 +41,7 @@ struct UPID
     return id != "" && ip != 0 && port != 0;
   }
 
-  bool operator ! () const
+  bool operator ! () const // NOLINT(whitespace/operators)
   {
     return id == "" && ip == 0 && port == 0;
   }


[2/2] git commit: Enabled whitespace/operators rule for cpplint.

Posted by me...@apache.org.
Enabled whitespace/operators rule for cpplint.

Enabled whitespace/operators rule for cpplint, which covers the following:
You should always have whitespace around binary operators.
Missing spaces around <, >, or =
We allow no-spaces around << when used like this: 10<<20, but
not otherwise (particularly, not when used as streams)
There shouldn't be space around unary operators

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


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

Branch: refs/heads/master
Commit: eaf703abcbd9720eedf53bc2e4fa2d84c80e4abc
Parents: 68959c5
Author: Adam B <ad...@mesosphere.io>
Authored: Mon Oct 13 22:54:24 2014 -0700
Committer: Adam B <ad...@mesosphere.io>
Committed: Mon Oct 13 22:54:24 2014 -0700

----------------------------------------------------------------------
 support/mesos-style.py | 1 +
 1 file changed, 1 insertion(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/mesos/blob/eaf703ab/support/mesos-style.py
----------------------------------------------------------------------
diff --git a/support/mesos-style.py b/support/mesos-style.py
index 68d31ff..e87388f 100755
--- a/support/mesos-style.py
+++ b/support/mesos-style.py
@@ -22,6 +22,7 @@ active_rules = ['build/class',
                 'whitespace/forcolon',
                 'whitespace/indent',
                 'whitespace/line_length',
+                'whitespace/operators',
                 'whitespace/semicolon',
                 'whitespace/tab',
                 'whitespace/todo']