Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MINOR: [C++] Fix clang-format of arrow/util/tracing_internal.h #45067

Closed
wants to merge 1 commit into from

Conversation

wgtmac
Copy link
Member

@wgtmac wgtmac commented Dec 18, 2024

Rationale for this change

It seems that arrow/util/tracing_internal.h has escaped the linter check.

What changes are included in this PR?

Apply clang-format to arrow/util/tracing_internal.h.

Are these changes tested?

Pass CI.

Are there any user-facing changes?

No.

@wgtmac
Copy link
Member Author

wgtmac commented Dec 18, 2024

All changes made by hooks:
diff --git a/cpp/src/arrow/util/tracing_internal.h b/cpp/src/arrow/util/tracing_internal.h
index f2c5f3ffe..6ed7[31](https://github.com/apache/arrow/actions/runs/12395219387/job/34600415615?pr=45067#step:6:32)599 100644
--- a/cpp/src/arrow/util/tracing_internal.h
+++ b/cpp/src/arrow/util/tracing_internal.h
@@ -135,11 +135,12 @@ opentelemetry::nostd::shared_ptr<opentelemetry::trace::Span>& RewrapSpan(
 opentelemetry::trace::StartSpanOptions SpanOptionsWithParent(
     const util::tracing::Span& parent_span);
 
-#  define START_SPAN(target_span, ...)                                           \
-    auto opentelemetry_scope##__LINE__ = ::arrow::internal::tracing::GetTracer() \
-        -> WithActiveSpan(::arrow::internal::tracing::RewrapSpan(                \
-            target_span.details.get(),                                           \
-            ::arrow::internal::tracing::GetTracer()->StartSpan(__VA_ARGS__)))
+#  define START_SPAN(target_span, ...)                           \
+    auto opentelemetry_scope##__LINE__ =                         \
+        ::arrow::internal::tracing::GetTracer()->WithActiveSpan( \
+            ::arrow::internal::tracing::RewrapSpan(              \
+                target_span.details.get(),                       \
+                ::arrow::internal::tracing::GetTracer()->StartSpan(__VA_ARGS__)))
 
 #  define START_SCOPED_SPAN(target_span, ...)                    \
     ::arrow::internal::tracing::Scope(                           \
Error: Process completed with exit code 1.

Fine, it seems that my clang-format version is incompatible with the pre-commit check.

@pitrou
Copy link
Member

pitrou commented Dec 18, 2024

Yeah, I think a specific version of clang-format is required if you want to match what pre-commit expects.

@wgtmac
Copy link
Member Author

wgtmac commented Dec 19, 2024

Let me fix it on my end.

@wgtmac wgtmac closed this Dec 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants