You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mesos.apache.org by mp...@apache.org on 2016/01/16 23:17:08 UTC

[1/3] mesos git commit: Enabled whitespace-comments category in `mesos-style.py`.

Repository: mesos
Updated Branches:
  refs/heads/master 1a8e96772 -> e563d31f0


Enabled whitespace-comments category in `mesos-style.py`.

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


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

Branch: refs/heads/master
Commit: e563d31f06986ffa304da20b391f05594e0afd2c
Parents: c07e65e
Author: Avinash sridharan <av...@mesosphere.io>
Authored: Fri Jan 15 16:15:32 2016 -0800
Committer: Michael Park <mp...@apache.org>
Committed: Sat Jan 16 14:13:47 2016 -0800

----------------------------------------------------------------------
 support/cpplint.py     | 12 ++++++------
 support/mesos-style.py |  1 +
 2 files changed, 7 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/mesos/blob/e563d31f/support/cpplint.py
----------------------------------------------------------------------
diff --git a/support/cpplint.py b/support/cpplint.py
index 6890e27..96e7fbc 100644
--- a/support/cpplint.py
+++ b/support/cpplint.py
@@ -29,6 +29,9 @@
 # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 
 # Modified by Adam B (adam@mesosphere.io) to handle hpp files.
+# Modified by Avinash S (avinash@mesosphere.io) to check for at least
+# a __single__ space in comments is required for hpp and cpp files.
+
 
 """Does google-lint on c++ files.
 
@@ -2635,13 +2638,10 @@ def CheckSpacing(filename, clean_lines, linenum, nesting_state, error):
     if (line.count('"', 0, commentpos) -
         line.count('\\"', 0, commentpos)) % 2 == 0:   # not in quotes
       # Allow one space for new scopes, two spaces otherwise:
-      if (not Match(r'^\s*{ //', line) and
-          ((commentpos >= 1 and
-            line[commentpos-1] not in string.whitespace) or
-           (commentpos >= 2 and
-            line[commentpos-2] not in string.whitespace))):
+      if (commentpos >= 1 and
+            line[commentpos-1] not in string.whitespace):
         error(filename, linenum, 'whitespace/comments', 2,
-              'At least two spaces is best between code and comments')
+              'At least a single space is required between code and comments')
       # There should always be a space between the // and the comment
       commentend = commentpos + 2
       if commentend < len(line) and not line[commentend] == ' ':

http://git-wip-us.apache.org/repos/asf/mesos/blob/e563d31f/support/mesos-style.py
----------------------------------------------------------------------
diff --git a/support/mesos-style.py b/support/mesos-style.py
index 5ee1759..815d88c 100755
--- a/support/mesos-style.py
+++ b/support/mesos-style.py
@@ -56,6 +56,7 @@ def run_lint(source_paths):
         'whitespace/operators',
         'whitespace/semicolon',
         'whitespace/tab',
+        'whitespace/comments',
         'whitespace/todo']
 
     rules_filter = '--filter=-,+' + ',+'.join(active_rules)


[2/3] mesos git commit: Fixed non-conformance of whitespace in comments for mesos.

Posted by mp...@apache.org.
Fixed non-conformance of whitespace in comments for mesos.

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


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

Branch: refs/heads/master
Commit: c07e65ef3559d9ba51a789b44eec0cb6291bf617
Parents: db0102d
Author: Avinash sridharan <av...@mesosphere.io>
Authored: Fri Jan 15 16:14:53 2016 -0800
Committer: Michael Park <mp...@apache.org>
Committed: Sat Jan 16 14:13:47 2016 -0800

----------------------------------------------------------------------
 src/authentication/cram_md5/authenticatee.hpp          | 2 +-
 src/authentication/cram_md5/authenticator.hpp          | 2 +-
 src/authorizer/local/authorizer.hpp                    | 2 +-
 src/tests/containerizer/docker_containerizer_tests.cpp | 2 +-
 4 files changed, 4 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/mesos/blob/c07e65ef/src/authentication/cram_md5/authenticatee.hpp
----------------------------------------------------------------------
diff --git a/src/authentication/cram_md5/authenticatee.hpp b/src/authentication/cram_md5/authenticatee.hpp
index 8efa6ff..d77b210 100644
--- a/src/authentication/cram_md5/authenticatee.hpp
+++ b/src/authentication/cram_md5/authenticatee.hpp
@@ -57,4 +57,4 @@ private:
 } // namespace internal {
 } // namespace mesos {
 
-#endif //__AUTHENTICATION_CRAM_MD5_AUTHENTICATEE_HPP__
+#endif // __AUTHENTICATION_CRAM_MD5_AUTHENTICATEE_HPP__

http://git-wip-us.apache.org/repos/asf/mesos/blob/c07e65ef/src/authentication/cram_md5/authenticator.hpp
----------------------------------------------------------------------
diff --git a/src/authentication/cram_md5/authenticator.hpp b/src/authentication/cram_md5/authenticator.hpp
index 901e151..a68b2cf 100644
--- a/src/authentication/cram_md5/authenticator.hpp
+++ b/src/authentication/cram_md5/authenticator.hpp
@@ -57,4 +57,4 @@ private:
 } // namespace internal {
 } // namespace mesos {
 
-#endif //__AUTHENTICATION_CRAM_MD5_AUTHENTICATOR_HPP__
+#endif // __AUTHENTICATION_CRAM_MD5_AUTHENTICATOR_HPP__

http://git-wip-us.apache.org/repos/asf/mesos/blob/c07e65ef/src/authorizer/local/authorizer.hpp
----------------------------------------------------------------------
diff --git a/src/authorizer/local/authorizer.hpp b/src/authorizer/local/authorizer.hpp
index 586f0da..c7321c2 100644
--- a/src/authorizer/local/authorizer.hpp
+++ b/src/authorizer/local/authorizer.hpp
@@ -81,4 +81,4 @@ private:
 } // namespace internal {
 } // namespace mesos {
 
-#endif //__AUTHORIZER_AUTHORIZER_HPP__
+#endif // __AUTHORIZER_AUTHORIZER_HPP__

http://git-wip-us.apache.org/repos/asf/mesos/blob/c07e65ef/src/tests/containerizer/docker_containerizer_tests.cpp
----------------------------------------------------------------------
diff --git a/src/tests/containerizer/docker_containerizer_tests.cpp b/src/tests/containerizer/docker_containerizer_tests.cpp
index cb58b71..a1a44da 100644
--- a/src/tests/containerizer/docker_containerizer_tests.cpp
+++ b/src/tests/containerizer/docker_containerizer_tests.cpp
@@ -975,7 +975,7 @@ TEST_F(DockerContainerizerTest, ROOT_DOCKER_Update)
 
   Shutdown();
 }
-#endif //__linux__
+#endif // __linux__
 
 
 TEST_F(DockerContainerizerTest, ROOT_DOCKER_Recover)


[3/3] mesos git commit: Fixed non-conformance of whitespace in comments for stout.

Posted by mp...@apache.org.
Fixed non-conformance of whitespace in comments for stout.

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


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

Branch: refs/heads/master
Commit: db0102dc45f058813e7fb0f672823a5580f1c2f6
Parents: 1a8e967
Author: Avinash sridharan <av...@mesosphere.io>
Authored: Fri Jan 15 16:15:28 2016 -0800
Committer: Michael Park <mp...@apache.org>
Committed: Sat Jan 16 14:13:47 2016 -0800

----------------------------------------------------------------------
 .../3rdparty/stout/include/stout/windows/error.hpp           | 8 ++++----
 3rdparty/libprocess/3rdparty/stout/tests/path_tests.cpp      | 2 +-
 2 files changed, 5 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/mesos/blob/db0102dc/3rdparty/libprocess/3rdparty/stout/include/stout/windows/error.hpp
----------------------------------------------------------------------
diff --git a/3rdparty/libprocess/3rdparty/stout/include/stout/windows/error.hpp b/3rdparty/libprocess/3rdparty/stout/include/stout/windows/error.hpp
index 27c5d5d..64102e1 100644
--- a/3rdparty/libprocess/3rdparty/stout/include/stout/windows/error.hpp
+++ b/3rdparty/libprocess/3rdparty/stout/include/stout/windows/error.hpp
@@ -84,12 +84,12 @@ private:
     LPSTR message_buffer;
     size_t size = FormatMessage(
         allocate_message_buffer,
-        NULL,                   // Ignored.
+        NULL,                    // Ignored.
         errorCode,
         default_language,
-        (LPSTR) &message_buffer,// See comment above for note about quirky cast.
-        0,                      // Ignored.
-        NULL);                  // Ignored.
+        (LPSTR) &message_buffer, // See comment above about quirky cast.
+        0,                       // Ignored.
+        NULL);                   // Ignored.
 
     std::string message(message_buffer, size);
 

http://git-wip-us.apache.org/repos/asf/mesos/blob/db0102dc/3rdparty/libprocess/3rdparty/stout/tests/path_tests.cpp
----------------------------------------------------------------------
diff --git a/3rdparty/libprocess/3rdparty/stout/tests/path_tests.cpp b/3rdparty/libprocess/3rdparty/stout/tests/path_tests.cpp
index 05b3a2d..6dff5e7 100644
--- a/3rdparty/libprocess/3rdparty/stout/tests/path_tests.cpp
+++ b/3rdparty/libprocess/3rdparty/stout/tests/path_tests.cpp
@@ -130,7 +130,7 @@ TEST(PathTest, Join)
   EXPECT_EQ("", path::join(vector<string>()));
   EXPECT_EQ("a/b/c", path::join(vector<string>({"a", "b", "c"})));
 
-  //TODO(cmaloney): This should join to ""
+  // TODO(cmaloney): This should join to ""
   EXPECT_EQ("/", path::join(vector<string>({"", "", ""})));
 
   // Interesting corner cases around being the first, middle, last.