hbase-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ecl...@apache.org
Subject [12/42] hbase git commit: HBASE-15730 Add on script to format all .h, .cc, and BUCK files.
Date Wed, 18 May 2016 22:49:33 GMT
HBASE-15730 Add on script to format all .h,.cc, and BUCK files.


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

Branch: refs/heads/HBASE-14850
Commit: 74ff76aa533a85f5dea2bd9c1159d4c84249b303
Parents: 3a98ebe
Author: Elliott Clark <eclark@apache.org>
Authored: Wed Apr 27 15:52:27 2016 -0700
Committer: Elliott Clark <elliott@fb.com>
Committed: Wed May 18 15:48:52 2016 -0700

----------------------------------------------------------------------
 hbase-native-client/bin/format-code.sh      |  7 +++++++
 hbase-native-client/connection/request.cc   | 14 +++++++-------
 hbase-native-client/utils/BUCK              |  8 ++++----
 hbase-native-client/utils/user-util-test.cc |  2 +-
 hbase-native-client/utils/user-util.cc      |  4 ++--
 hbase-native-client/utils/user-util.h       |  2 +-
 6 files changed, 22 insertions(+), 15 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hbase/blob/74ff76aa/hbase-native-client/bin/format-code.sh
----------------------------------------------------------------------
diff --git a/hbase-native-client/bin/format-code.sh b/hbase-native-client/bin/format-code.sh
new file mode 100755
index 0000000..24d6515
--- /dev/null
+++ b/hbase-native-client/bin/format-code.sh
@@ -0,0 +1,7 @@
+#!/usr/bin/env bash
+set -euo pipefail
+IFS=$'\n\t'
+
+
+find core connection serde utils -name "*.h" -or -name "*.cc" | xargs -P8 clang-format -i
+find core connection serde utils third-party -name "BUCK" | xargs -P8 yapf -i

http://git-wip-us.apache.org/repos/asf/hbase/blob/74ff76aa/hbase-native-client/connection/request.cc
----------------------------------------------------------------------
diff --git a/hbase-native-client/connection/request.cc b/hbase-native-client/connection/request.cc
index 50ea029..d4a4603 100644
--- a/hbase-native-client/connection/request.cc
+++ b/hbase-native-client/connection/request.cc
@@ -30,16 +30,16 @@ Request::Request(std::shared_ptr<google::protobuf::Message> req,
 
 std::unique_ptr<Request> Request::get() {
   return std::make_unique<Request>(std::make_shared<hbase::pb::GetRequest>(),
-                                  std::make_shared<hbase::pb::GetResponse>(),
-                                  "Get");
+                                   std::make_shared<hbase::pb::GetResponse>(),
+                                   "Get");
 }
 std::unique_ptr<Request> Request::mutate() {
-  return std::make_unique<Request>(std::make_shared<hbase::pb::MutateRequest>(),
-                                  std::make_shared<hbase::pb::MutateResponse>(),
-                                  "Mutate");
+  return std::make_unique<Request>(
+      std::make_shared<hbase::pb::MutateRequest>(),
+      std::make_shared<hbase::pb::MutateResponse>(), "Mutate");
 }
 std::unique_ptr<Request> Request::scan() {
   return std::make_unique<Request>(std::make_shared<hbase::pb::ScanRequest>(),
-                                  std::make_shared<hbase::pb::ScanResponse>(),
-                                  "Scan");
+                                   std::make_shared<hbase::pb::ScanResponse>(),
+                                   "Scan");
 }

http://git-wip-us.apache.org/repos/asf/hbase/blob/74ff76aa/hbase-native-client/utils/BUCK
----------------------------------------------------------------------
diff --git a/hbase-native-client/utils/BUCK b/hbase-native-client/utils/BUCK
index 2b65b12..ad12f7d 100644
--- a/hbase-native-client/utils/BUCK
+++ b/hbase-native-client/utils/BUCK
@@ -23,18 +23,18 @@ cxx_library(name="utils",
                 "user-util.cc",
             ],
             deps=[
-              '//third-party:folly',
+                '//third-party:folly',
             ],
             visibility=[
                 'PUBLIC',
             ],
             tests=[
-              ":user-util-test"
-            ],)
+                ":user-util-test"
+            ], )
 cxx_test(name="user-util-test",
          srcs=[
              "user-util-test.cc",
          ],
          deps=[
              ":utils",
-         ],)
+         ], )

http://git-wip-us.apache.org/repos/asf/hbase/blob/74ff76aa/hbase-native-client/utils/user-util-test.cc
----------------------------------------------------------------------
diff --git a/hbase-native-client/utils/user-util-test.cc b/hbase-native-client/utils/user-util-test.cc
index 1e72bcc..7c11d8c 100644
--- a/hbase-native-client/utils/user-util-test.cc
+++ b/hbase-native-client/utils/user-util-test.cc
@@ -17,9 +17,9 @@
  *
  */
 
+#include <folly/Logging.h>
 #include <gtest/gtest.h>
 #include <string>
-#include <folly/Logging.h>
 
 #include "utils/user-util.h"
 

http://git-wip-us.apache.org/repos/asf/hbase/blob/74ff76aa/hbase-native-client/utils/user-util.cc
----------------------------------------------------------------------
diff --git a/hbase-native-client/utils/user-util.cc b/hbase-native-client/utils/user-util.cc
index c4427e3..b801537 100644
--- a/hbase-native-client/utils/user-util.cc
+++ b/hbase-native-client/utils/user-util.cc
@@ -19,10 +19,10 @@
 
 #include "utils/user-util.h"
 
+#include <folly/Logging.h>
 #include <pwd.h>
-#include <unistd.h>
 #include <sys/types.h>
-#include <folly/Logging.h>
+#include <unistd.h>
 
 using namespace hbase;
 using namespace std;

http://git-wip-us.apache.org/repos/asf/hbase/blob/74ff76aa/hbase-native-client/utils/user-util.h
----------------------------------------------------------------------
diff --git a/hbase-native-client/utils/user-util.h b/hbase-native-client/utils/user-util.h
index 4f74948..9ca28e3 100644
--- a/hbase-native-client/utils/user-util.h
+++ b/hbase-native-client/utils/user-util.h
@@ -19,8 +19,8 @@
 
 #pragma once
 
-#include <memory>
 #include <atomic>
+#include <memory>
 #include <mutex>
 
 namespace hbase {


Mime
View raw message