protocolbuffers / protobuf

Protocol Buffers - Google's data interchange format
http://protobuf.dev
Other
65.84k stars 15.52k forks source link

Generated PHP code with incorrect comment formating #14563

Open vishwarajanand opened 1 year ago

vishwarajanand commented 1 year ago

Language: PHP

What did you do? Steps to reproduce the behavior:

  1. Go to https://github.com/googleapis/google-cloud-php/pull/6737/files
  2. Click on Dataform/src/V1beta1/Client/DataformClient.php
  3. Scroll down to setIamPolicy and see the code block over the method, it has missing asterisk sign in comments.

What did you expect to see All comments start with asterisk.

What did you see instead? ref

/**
     * Sets the access control policy on the specified resource. Replaces
    any existing policy.

    Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED`
    errors.
     *
     * The async variant is {@see DataformClient::setIamPolicyAsync()} .
     *
haberman commented 10 months ago

It looks like the code generator is attempting to put an asterisk at the beginning of every line: https://github.com/protocolbuffers/protobuf/blob/758f5cbe19911f313c4185fc5b7a3522f1d6836a/src/google/protobuf/compiler/php/php_generator.cc#L1619-L1627

But for some reason this isn't working. We'd be happy to accept a contribution to fix this.