Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,7 @@ namespace {
void GetBucketEncryptionEnforcementConfig(
google::cloud::storage::Client client,
std::vector<std::string> const& argv) {
//! [get bucket encryption enforcement config] [START
//! storage_get_bucket_encryption_enforcement_config]
//! [get bucket encryption enforcement config] [START storage_get_bucket_encryption_enforcement_config]
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Given this line exceeds 80 columns, clang-format will wrap it. I would try either putting them on separate lines (assuming the various documentation tools can handle that), or trying adding // clang-format off and // clang-format on before and after the tags to try and prevent the wrapping form occurring.

namespace gcs = ::google::cloud::storage;
using ::google::cloud::StatusOr;
[](gcs::Client client, std::string const& bucket_name) {
Expand Down Expand Up @@ -65,16 +64,14 @@ void GetBucketEncryptionEnforcementConfig(
encryption.customer_supplied_encryption_enforcement_config)
<< "\n";
}
//! [get bucket encryption enforcement config] [END
//! storage_get_bucket_encryption_enforcement_config]
//! [get bucket encryption enforcement config] [END storage_get_bucket_encryption_enforcement_config]
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

The placement of this END region tag between the lambda's closing brace and its invocation results in a documentation snippet that is incomplete. The extracted code will contain the lambda definition but not the call, making it non-runnable as a standalone example. Consider moving this tag after the invocation (the next line) to ensure the documentation provides a complete, functional example.

(std::move(client), argv.at(0));
}

void SetBucketEncryptionEnforcementConfig(
google::cloud::storage::Client client,
std::vector<std::string> const& argv) {
//! [set bucket encryption enforcement config] [START
//! storage_set_bucket_encryption_enforcement_config]
//! [set bucket encryption enforcement config] [START storage_set_bucket_encryption_enforcement_config]
namespace gcs = ::google::cloud::storage;
using ::google::cloud::StatusOr;
[](gcs::Client client, std::string const& project_id,
Expand Down Expand Up @@ -127,16 +124,14 @@ void SetBucketEncryptionEnforcementConfig(
<< create_bucket("rc-" + bucket_name, csek_encryption)->name()
<< " created with a policy to restrict CSEK.\n";
}
//! [set bucket encryption enforcement config] [END
//! storage_set_bucket_encryption_enforcement_config]
//! [set bucket encryption enforcement config] [END storage_set_bucket_encryption_enforcement_config]
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

The placement of this END region tag between the lambda's closing brace and its invocation results in a documentation snippet that is incomplete. The extracted code will contain the lambda definition but not the call, making it non-runnable as a standalone example. Consider moving this tag after the invocation (the next line) to ensure the documentation provides a complete, functional example.

(std::move(client), argv.at(0), argv.at(1));
}

void UpdateBucketEncryptionEnforcementConfig(
google::cloud::storage::Client client,
std::vector<std::string> const& argv) {
//! [update bucket encryption enforcement config] [START
//! storage_update_bucket_encryption_enforcement_config]
//! [update bucket encryption enforcement config] [START storage_update_bucket_encryption_enforcement_config]
namespace gcs = ::google::cloud::storage;
using ::google::cloud::StatusOr;
[](gcs::Client client, std::string const& bucket_name) {
Expand Down Expand Up @@ -171,8 +166,7 @@ void UpdateBucketEncryptionEnforcementConfig(
<< "GMEK is now fully restricted, and CMEK enforcement has been "
"removed.\n";
}
//! [update bucket encryption enforcement config] [END
//! storage_update_bucket_encryption_enforcement_config]
//! [update bucket encryption enforcement config] [END storage_update_bucket_encryption_enforcement_config]
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

The placement of this END region tag between the lambda's closing brace and its invocation results in a documentation snippet that is incomplete. The extracted code will contain the lambda definition but not the call, making it non-runnable as a standalone example. Consider moving this tag after the invocation (the next line) to ensure the documentation provides a complete, functional example.

(std::move(client), argv.at(0));
}

Expand Down
Loading