You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by xy...@apache.org on 2022/10/06 09:43:08 UTC

[pulsar-client-cpp] branch main updated: Enable format check in PR validation (#17)

This is an automated email from the ASF dual-hosted git repository.

xyz pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/pulsar-client-cpp.git


The following commit(s) were added to refs/heads/main by this push:
     new 5ed0929  Enable format check in PR validation (#17)
5ed0929 is described below

commit 5ed09296680fe17d9cb6985636904be95c98d8cc
Author: Matteo Merli <mm...@apache.org>
AuthorDate: Thu Oct 6 04:43:03 2022 -0500

    Enable format check in PR validation (#17)
---
 .github/workflows/ci-pr-validation.yaml |  4 ++--
 lib/ClientConfiguration.cc              |  4 +++-
 lib/checksum/crc32c_arm.h               | 10 +++++-----
 tests/AuthPluginTest.cc                 |  2 +-
 tests/ProtobufNativeSchemaTest.cc       |  3 +--
 5 files changed, 12 insertions(+), 11 deletions(-)

diff --git a/.github/workflows/ci-pr-validation.yaml b/.github/workflows/ci-pr-validation.yaml
index 321a4a8..0c2e4ef 100644
--- a/.github/workflows/ci-pr-validation.yaml
+++ b/.github/workflows/ci-pr-validation.yaml
@@ -61,8 +61,8 @@ jobs:
       - name: CMake
         run: cmake . -DBUILD_PERF_TOOLS=ON
 
-#      - name: Check formatting
-#        run: make check-format
+      - name: Check formatting
+        run: make check-format
 
       - name: Build
         run: make -j8
diff --git a/lib/ClientConfiguration.cc b/lib/ClientConfiguration.cc
index ce6944b..1a161c3 100644
--- a/lib/ClientConfiguration.cc
+++ b/lib/ClientConfiguration.cc
@@ -87,7 +87,9 @@ ClientConfiguration& ClientConfiguration::setTlsPrivateKeyFilePath(const std::st
     return *this;
 }
 
-const std::string& ClientConfiguration::getTlsPrivateKeyFilePath() const { return impl_->tlsPrivateKeyFilePath; }
+const std::string& ClientConfiguration::getTlsPrivateKeyFilePath() const {
+    return impl_->tlsPrivateKeyFilePath;
+}
 
 ClientConfiguration& ClientConfiguration::setTlsCertificateFilePath(const std::string& filePath) {
     impl_->tlsCertificateFilePath = filePath;
diff --git a/lib/checksum/crc32c_arm.h b/lib/checksum/crc32c_arm.h
index 8622152..4848fc0 100644
--- a/lib/checksum/crc32c_arm.h
+++ b/lib/checksum/crc32c_arm.h
@@ -37,11 +37,11 @@
 #define crc32c_u16(crc, v) __crc32ch(crc, v)
 #define crc32c_u32(crc, v) __crc32cw(crc, v)
 #define crc32c_u64(crc, v) __crc32cd(crc, v)
-#define PREF4X64L1(buffer, PREF_OFFSET, ITR)                                                                \
-    __asm__("PRFM PLDL1KEEP, [%x[v],%[c]]" ::[v] "r"(buffer), [ c ] "I"((PREF_OFFSET) + ((ITR) + 0) * 64)); \
-    __asm__("PRFM PLDL1KEEP, [%x[v],%[c]]" ::[v] "r"(buffer), [ c ] "I"((PREF_OFFSET) + ((ITR) + 1) * 64)); \
-    __asm__("PRFM PLDL1KEEP, [%x[v],%[c]]" ::[v] "r"(buffer), [ c ] "I"((PREF_OFFSET) + ((ITR) + 2) * 64)); \
-    __asm__("PRFM PLDL1KEEP, [%x[v],%[c]]" ::[v] "r"(buffer), [ c ] "I"((PREF_OFFSET) + ((ITR) + 3) * 64));
+#define PREF4X64L1(buffer, PREF_OFFSET, ITR)                                                              \
+    __asm__("PRFM PLDL1KEEP, [%x[v],%[c]]" ::[v] "r"(buffer), [c] "I"((PREF_OFFSET) + ((ITR) + 0) * 64)); \
+    __asm__("PRFM PLDL1KEEP, [%x[v],%[c]]" ::[v] "r"(buffer), [c] "I"((PREF_OFFSET) + ((ITR) + 1) * 64)); \
+    __asm__("PRFM PLDL1KEEP, [%x[v],%[c]]" ::[v] "r"(buffer), [c] "I"((PREF_OFFSET) + ((ITR) + 2) * 64)); \
+    __asm__("PRFM PLDL1KEEP, [%x[v],%[c]]" ::[v] "r"(buffer), [c] "I"((PREF_OFFSET) + ((ITR) + 3) * 64));
 
 #define PREF1KL1(buffer, PREF_OFFSET)    \
     PREF4X64L1(buffer, (PREF_OFFSET), 0) \
diff --git a/tests/AuthPluginTest.cc b/tests/AuthPluginTest.cc
index 0a64651..8ba9563 100644
--- a/tests/AuthPluginTest.cc
+++ b/tests/AuthPluginTest.cc
@@ -38,7 +38,7 @@ static const std::string serviceUrlHttps = "https://localhost:8443";
 
 static const std::string caPath = "../test-conf/cacert.pem";
 static const std::string clientPublicKeyPath = "../test-conf/client-cert.pem";
-static const std::string clientPrivateKeyPath =     "../test-conf/client-key.pem";
+static const std::string clientPrivateKeyPath = "../test-conf/client-key.pem";
 
 static void sendCallBackTls(Result r, const MessageId& msgId) {
     ASSERT_EQ(r, ResultOk);
diff --git a/tests/ProtobufNativeSchemaTest.cc b/tests/ProtobufNativeSchemaTest.cc
index 3f2315a..f9557bd 100644
--- a/tests/ProtobufNativeSchemaTest.cc
+++ b/tests/ProtobufNativeSchemaTest.cc
@@ -104,8 +104,7 @@ TEST(ProtobufNativeSchemaTest, testSchemaIncompatibility) {
     producer.close();
 
     // Try to create producer with another protobuf generated class
-    ASSERT_EQ(ResultIncompatibleSchema,
-              createProducerResult(getExternalMessageDescriptor()));
+    ASSERT_EQ(ResultIncompatibleSchema, createProducerResult(getExternalMessageDescriptor()));
 
     // Try to create producer with the original schema again
     ASSERT_EQ(ResultOk, createProducerResult(getTestMessageDescriptor()));