mesos-reviews mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Avinash sridharan" <avin...@mesosphere.io>
Subject Re: Review Request 41617: Added a new category called whitespace/mesos-comments to capture missing, leading, white-space in comments
Date Wed, 13 Jan 2016 20:15:37 GMT

-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/41617/
-----------------------------------------------------------

(Updated Jan. 13, 2016, 8:15 p.m.)


Review request for mesos and Michael Park.


Bugs: MESOS-4231
    https://issues.apache.org/jira/browse/MESOS-4231


Repository: mesos


Description
-------

Added a new category called whitespace/mesos-comments to capture missing, leading, white-space
in comments


Diffs
-----

  support/cpplint.py 6890e27f92603b025e25e4db01decf351c33c9a1 
  support/mesos-style.py 5ee17593153df7815426918a1da6e25cb1188bca 

Diff: https://reviews.apache.org/r/41617/diff/


Testing
-------

Ran the modified mesos-style.py on the existing code-base and got the following errors:
rc/authentication/cram_md5/authenticatee.hpp:60:  Should have a space between // and comment
 [whitespace/mesos-comments] [4]
  2 src/authentication/cram_md5/authenticator.hpp:60:  Should have a space between // and
comment  [whitespace/mesos-comments] [4]
  3 src/authorizer/local/authorizer.hpp:82:  Should have a space between // and comment  [whitespace/mesos-comments]
[4]
  4 src/tests/containerizer/docker_containerizer_tests.cpp:921:  Should have a space between
// and comment  [whitespace/mesos-comments] [4]
  5 3rdparty/libprocess/3rdparty/stout/tests/path_tests.cpp:104:  Should have a space between
// and comment  [whitespace/mesos-comments] [4]
  6 Total errors found: 1
  
  
  Doesn't seem to give any false-positives. All the above errors do have a missing leading
white-space. 
  
  Tried a commit for the following patch:
  diff --git a/src/tests/slave_tests.cpp b/src/tests/slave_tests.cpp  
index 90d56b9..17fcbed 100644  
--- a/src/tests/slave_tests.cpp  
+++ b/src/tests/slave_tests.cpp  
@@ -2238,7 +2238,7 @@ TEST_F(SlaveTest, DiscoveryInfoAndPorts)  
   EXPECT_SOME(portResult1);  
   EXPECT_SOME(portResult2);  
  
-  // Verify that the ports retrieved from state.json are the ones that were set.  
+  //Verify that the ports retrieved from state.json are the ones that were set.  
   EXPECT_EQ(JSON::Object(JSON::protobuf(*port1)), portResult1.get());  
   EXPECT_EQ(JSON::Object(JSON::protobuf(*port2)), portResult2.get());  


And the git commit hook correctly failed it:
git commit -m "Checking the new hook"
Checking 1 files
src/tests/slave_tests.cpp:2241:  Should have a space between // and comment  [whitespace/mesos-comments]
[4]
Total errors found: 1


Thanks,

Avinash sridharan


Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message