Skip to content

chore(storage): use designated initializers for client.cc/h files#15106

Closed
Pulkit0110 wants to merge 1 commit intogoogleapis:mainfrom
Pulkit0110:formatting
Closed

chore(storage): use designated initializers for client.cc/h files#15106
Pulkit0110 wants to merge 1 commit intogoogleapis:mainfrom
Pulkit0110:formatting

Conversation

@Pulkit0110
Copy link
Contributor

@Pulkit0110 Pulkit0110 commented Apr 24, 2025

Formatted storage client.cc and client.h files to use designated initializers as per https://clang.llvm.org/extra/clang-tidy/checks/modernize/use-designated-initializers.html#modernize-use-designated-initializers.


This change is Reviewable

@Pulkit0110 Pulkit0110 requested review from a team April 24, 2025 07:34
@product-auto-label product-auto-label bot added the api: storage Issues related to the Cloud Storage API. label Apr 24, 2025
@Pulkit0110 Pulkit0110 requested a review from bajajneha27 April 24, 2025 07:35
@codecov
Copy link

codecov bot commented Apr 24, 2025

Codecov Report

Attention: Patch coverage is 91.66667% with 2 lines in your changes missing coverage. Please review.

Project coverage is 92.90%. Comparing base (7d87eb6) to head (43b6edd).
Report is 5 commits behind head on main.

Files with missing lines Patch % Lines
google/cloud/storage/client.cc 94.44% 1 Missing ⚠️
google/cloud/storage/client.h 83.33% 1 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##             main   #15106   +/-   ##
=======================================
  Coverage   92.90%   92.90%           
=======================================
  Files        2360     2360           
  Lines      211708   211712    +4     
=======================================
+ Hits       196685   196699   +14     
+ Misses      15023    15013   -10     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@scotthart
Copy link
Member

Thanks for the PR, but unfortunately we won't be able to merge these changes at this time. Designated initializers are a c++20 feature (https://en.cppreference.com/w/cpp/language/aggregate_initialization). While compilers some times implement features prior to their standardization, in order to maintain portability, we cannot use them ahead of time.

The silver lining is that this PR has brought to our attention that we do not have any CI builds that enable -pedantic which would have caught this. We will be adding -pdenatic to the clng-tidy builds in order to prevent this from happening in the future.

@scotthart scotthart added the do not merge Indicates a pull request not ready for merge, due to either quality or timing. label Apr 25, 2025
@Pulkit0110 Pulkit0110 closed this Apr 30, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

api: storage Issues related to the Cloud Storage API. do not merge Indicates a pull request not ready for merge, due to either quality or timing.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants