Skip to content

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

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

Pulkit0110
Copy link
Member

@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 as code owners 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
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 4 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
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