google-cloud-cpp icon indicating copy to clipboard operation
google-cloud-cpp copied to clipboard

clang-format needs to be run twice in generate-libraries

Open scotthart opened this issue 2 years ago • 1 comments

Likely due to an issue in clang-format, it needs to be executed twice to result in the desired formatting of google/cloud/compute/firewall_policies/v1/internal/firewall_policies_rest_connection_impl.cc

diff from output of the first execution to the second:

Step #3: @@ -86,14 +86,10 @@ FirewallPoliciesRestConnectionImpl::AddAssociation(
Step #3:        },
Step #3:        [request](std::string const& op,
Step #3:                  google::cloud::cpp::compute::global_organization_operations::
Step #3: -                    v1::GetOperationRequest& r) {
Step #3: -        r.set_operation(op);
Step #3: -      },
Step #3: +                    v1::GetOperationRequest& r) { r.set_operation(op); },
Step #3:        [request](std::string const& op,
Step #3:                  google::cloud::cpp::compute::global_organization_operations::
Step #3: -                    v1::DeleteOperationRequest& r) {
Step #3: -        r.set_operation(op);
Step #3: -      });
Step #3: +                    v1::DeleteOperationRequest& r) { r.set_operation(op); });
Step #3:  }

scotthart avatar Sep 11 '23 23:09 scotthart

clang-format requires two executions at present. When this gets fixed we can only run clang-format once.

scotthart avatar Mar 06 '24 20:03 scotthart

Workaround in place; closing.

scotthart avatar Sep 11 '24 19:09 scotthart