mesos-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From m.@apache.org
Subject git commit: Enabled whitespace/semicolon rule for cpplint.
Date Tue, 14 Oct 2014 04:35:06 GMT
Repository: mesos
Updated Branches:
  refs/heads/master 0b092b1b0 -> 5d5b65e57


Enabled whitespace/semicolon rule for cpplint.

You should always have a space after a semicolon except for few corner
cases

You shouldn't have a space before a semicolon at the end of the line.
There's a special case for "for" since the style guide allows space
before the semicolon there.

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


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

Branch: refs/heads/master
Commit: 5d5b65e5722a21868315d80eb05428b11b4d87d0
Parents: 0b092b1
Author: Adam B <adam@mesosphere.io>
Authored: Mon Oct 13 21:33:11 2014 -0700
Committer: Adam B <adam@mesosphere.io>
Committed: Mon Oct 13 21:33:11 2014 -0700

----------------------------------------------------------------------
 src/master/master.cpp       | 2 +-
 src/tests/cgroups_tests.cpp | 2 +-
 support/mesos-style.py      | 1 +
 3 files changed, 3 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/mesos/blob/5d5b65e5/src/master/master.cpp
----------------------------------------------------------------------
diff --git a/src/master/master.cpp b/src/master/master.cpp
index cb46cec..1b1ce0d 100644
--- a/src/master/master.cpp
+++ b/src/master/master.cpp
@@ -1716,7 +1716,7 @@ void Master::deactivateFramework(
   if (from != framework->pid) {
     LOG(WARNING)
       << "Ignoring deactivate framework message for framework " << *framework
-      << " because it is not expected from " << from ;
+      << " because it is not expected from " << from;
     return;
   }
 

http://git-wip-us.apache.org/repos/asf/mesos/blob/5d5b65e5/src/tests/cgroups_tests.cpp
----------------------------------------------------------------------
diff --git a/src/tests/cgroups_tests.cpp b/src/tests/cgroups_tests.cpp
index 1d2fc36..1eea57f 100644
--- a/src/tests/cgroups_tests.cpp
+++ b/src/tests/cgroups_tests.cpp
@@ -799,7 +799,7 @@ TEST_F(CgroupsAnyHierarchyWithFreezerTest, ROOT_CGROUPS_Destroy)
     ::close(pipes[1]);
 
     // Wait kill signal from parent.
-    while (true) ;
+    while (true) {}
 
     // Should not reach here.
     std::cerr << "Reach an unreachable statement!" << std::endl;

http://git-wip-us.apache.org/repos/asf/mesos/blob/5d5b65e5/support/mesos-style.py
----------------------------------------------------------------------
diff --git a/support/mesos-style.py b/support/mesos-style.py
index b65272b..68d31ff 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/semicolon',
                 'whitespace/tab',
                 'whitespace/todo']
 


Mime
View raw message