You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mesos.apache.org by vi...@apache.org on 2014/05/16 01:36:54 UTC

git commit: Enabled whitespace/blank_line rule for cpplint.

Repository: mesos
Updated Branches:
  refs/heads/master 841cdbdc0 -> d14ab93a5


Enabled whitespace/blank_line rule for cpplint.

Enabled whitespace/blank_line rule for cpplint, which covers the
following:
'Redundant blank line at the start of a code block '
'should be deleted.'
'Redundant blank line at the end of a code block '
'should be deleted.'
'Do not leave a blank line after "public|protected|private:"'
'"class|struct:" should be preceded by a blank line'

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


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

Branch: refs/heads/master
Commit: d14ab93a5346408983deeb203a384624257edba0
Parents: 841cdbd
Author: Adam B <ad...@mesosphere.io>
Authored: Thu May 15 16:36:33 2014 -0700
Committer: Vinod Kone <vi...@twitter.com>
Committed: Thu May 15 16:36:34 2014 -0700

----------------------------------------------------------------------
 src/authorizer/authorizer.hpp              | 4 ----
 src/common/resources.cpp                   | 1 -
 src/slave/containerizer/linux_launcher.hpp | 1 -
 src/slave/slave.cpp                        | 1 -
 src/tests/cluster.hpp                      | 4 +---
 src/tests/isolator.hpp                     | 1 -
 src/tests/mesos.hpp                        | 1 -
 support/mesos-style.py                     | 1 +
 8 files changed, 2 insertions(+), 12 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/mesos/blob/d14ab93a/src/authorizer/authorizer.hpp
----------------------------------------------------------------------
diff --git a/src/authorizer/authorizer.hpp b/src/authorizer/authorizer.hpp
index f37091a..75b5a33 100644
--- a/src/authorizer/authorizer.hpp
+++ b/src/authorizer/authorizer.hpp
@@ -104,7 +104,6 @@ public:
       // ACL matches if both subjects and objects match.
       if (matches(request.principals(), acl.principals()) &&
           matches(request.users(), acl.users())) {
-
         // ACL is allowed if both subjects and objects are allowed.
         return allows(request.principals(), acl.principals()) &&
                allows(request.users(), acl.users());
@@ -120,7 +119,6 @@ public:
       // ACL matches if both subjects and objects match.
       if (matches(request.principals(), acl.principals()) &&
           matches(request.roles(), acl.roles())) {
-
         // ACL is allowed if both subjects and objects are allowed.
         return allows(request.principals(), acl.principals()) &&
                allows(request.roles(), acl.roles());
@@ -138,7 +136,6 @@ public:
           matches(request.ips(), acl.ips()) &&
           matches(request.hostnames(), acl.hostnames()) &&
           matches(request.urls(), acl.urls())) {
-
         // ACL is allowed if both subjects and objects are allowed.
         return allows(request.usernames(), acl.usernames()) &&
                allows(request.ips(), acl.ips()) &&
@@ -158,7 +155,6 @@ public:
           matches(request.ips(), acl.ips()) &&
           matches(request.hostnames(), acl.hostnames()) &&
           matches(request.urls(), acl.urls())) {
-
         // ACL is allowed if both subjects and objects are allowed.
         return allows(request.usernames(), acl.usernames()) &&
                allows(request.ips(), acl.ips()) &&

http://git-wip-us.apache.org/repos/asf/mesos/blob/d14ab93a/src/common/resources.cpp
----------------------------------------------------------------------
diff --git a/src/common/resources.cpp b/src/common/resources.cpp
index 512dabf..d39001b 100644
--- a/src/common/resources.cpp
+++ b/src/common/resources.cpp
@@ -238,7 +238,6 @@ Option<Resources> Resources::find(
           if ((i == 0 && potential.role() == role) ||
               (i == 1 && potential.role() == "*" && potential.role() != role) ||
               (i == 2 && potential.role() != "*" && potential.role() != role)) {
-
             // The resources must have the same role for <= to work.
             Resource potential_ = potential;
             potential_.set_role(remaining.role());

http://git-wip-us.apache.org/repos/asf/mesos/blob/d14ab93a/src/slave/containerizer/linux_launcher.hpp
----------------------------------------------------------------------
diff --git a/src/slave/containerizer/linux_launcher.hpp b/src/slave/containerizer/linux_launcher.hpp
index 84249c3..60b401f 100644
--- a/src/slave/containerizer/linux_launcher.hpp
+++ b/src/slave/containerizer/linux_launcher.hpp
@@ -58,7 +58,6 @@ private:
   // The 'pid' is the process id of the child process and also the process
   // group id and session id.
   hashmap<ContainerID, pid_t> pids;
-
 };
 
 

http://git-wip-us.apache.org/repos/asf/mesos/blob/d14ab93a/src/slave/slave.cpp
----------------------------------------------------------------------
diff --git a/src/slave/slave.cpp b/src/slave/slave.cpp
index 4a8adf0..ce04afb 100644
--- a/src/slave/slave.cpp
+++ b/src/slave/slave.cpp
@@ -1879,7 +1879,6 @@ void Slave::reregisterExecutor(
       foreach (Task* task, executor->launchedTasks.values()) {
         if (task->state() == TASK_STAGING &&
             !unackedTasks.contains(task->task_id())) {
-
           LOG(INFO)
             << "Transitioning STAGED task " << task->task_id() << " to LOST"
             << " because it is unknown to the executor " << executorId;

http://git-wip-us.apache.org/repos/asf/mesos/blob/d14ab93a/src/tests/cluster.hpp
----------------------------------------------------------------------
diff --git a/src/tests/cluster.hpp b/src/tests/cluster.hpp
index 5dce50d..f4cc9a6 100644
--- a/src/tests/cluster.hpp
+++ b/src/tests/cluster.hpp
@@ -445,7 +445,6 @@ inline void Cluster::Slaves::shutdown()
   foreachpair (const process::PID<slave::Slave>& pid,
                const Slave& slave,
                copy) {
-
     process::Future<hashset<ContainerID> > containers =
       slave.containerizer->containers();
     AWAIT_READY(containers);
@@ -606,8 +605,7 @@ inline Try<Nothing> Cluster::Slaves::stop(
   // when the --slave_subsystems flag is used.
   if (slave.flags.slave_subsystems.isSome()) {
     foreach (const std::string& subsystem,
-            strings::tokenize(slave.flags.slave_subsystems.get(), ",")) {
-
+             strings::tokenize(slave.flags.slave_subsystems.get(), ",")) {
       std::string hierarchy = path::join(
           slave.flags.cgroups_hierarchy, subsystem);
 

http://git-wip-us.apache.org/repos/asf/mesos/blob/d14ab93a/src/tests/isolator.hpp
----------------------------------------------------------------------
diff --git a/src/tests/isolator.hpp b/src/tests/isolator.hpp
index b1a3ac2..89df4c4 100644
--- a/src/tests/isolator.hpp
+++ b/src/tests/isolator.hpp
@@ -31,7 +31,6 @@ namespace tests {
 class TestIsolatorProcess : public slave::IsolatorProcess
 {
 public:
-
   static Try<slave::Isolator*> create(const Option<CommandInfo>& commandInfo)
   {
     process::Owned<slave::IsolatorProcess> process(

http://git-wip-us.apache.org/repos/asf/mesos/blob/d14ab93a/src/tests/mesos.hpp
----------------------------------------------------------------------
diff --git a/src/tests/mesos.hpp b/src/tests/mesos.hpp
index 15afbbb..a1a7d79 100644
--- a/src/tests/mesos.hpp
+++ b/src/tests/mesos.hpp
@@ -189,7 +189,6 @@ private:
 
   // Set of cgroup subsystems used by the cgroups related tests.
   hashset<std::string> subsystems;
-
 };
 #else
 template<>

http://git-wip-us.apache.org/repos/asf/mesos/blob/d14ab93a/support/mesos-style.py
----------------------------------------------------------------------
diff --git a/support/mesos-style.py b/support/mesos-style.py
index 9948817..fd12be9 100755
--- a/support/mesos-style.py
+++ b/support/mesos-style.py
@@ -13,6 +13,7 @@ active_rules = ['build/class',
                 'build/deprecated',
                 'build/endif_comment',
                 'runtime/vlog',
+                'whitespace/blank_line',
                 'whitespace/comma',
                 'whitespace/ending_newline',
                 'whitespace/forcolon',