gapic-generator-python icon indicating copy to clipboard operation
gapic-generator-python copied to clipboard

docs build failed in google-cloud-securitycentermanagement

Open parthea opened this issue 2 years ago • 0 comments

See https://github.com/googleapis/googleapis/blob/a549ce6e7b62f6fcb808dfec151bef631c986cd5/google/cloud/securitycentermanagement/v1/security_center_management.proto#L784-L786 where there is a list which is not properly formatted

This caused the docs build to fail with

Shinx.errors.SphinxWarning: /usr/local/google/home/partheniou/git/google-cloud-python/packages/google-cloud-securitycentermanagement/google/cloud/securitycentermanagement_v1/types/security_center_management.py:docstring of google.cloud.securitycentermanagement_v1.types.security_center_management.UpdateSecurityHealthAnalyticsCustomModuleRequest:32:Unexpected indentation.

Instead of

  // invalid. Note that a subsequent request to actually update the module could
  // still fail because 1. the state could have changed (e.g. IAM permission
  // lost) or
  // 2. A failure occurred while trying to update the module.

It should be

  // invalid. Note that a subsequent request to actually update the module could
  // still fail because:
  // 1. the state could have changed (e.g. IAM permission lost) or
  // 2. A failure occurred while trying to update the module.

In addition, there is a list which has an extra leading space in front of the list items https://github.com/googleapis/googleapis/blob/a549ce6e7b62f6fcb808dfec151bef631c986cd5/google/cloud/securitycentermanagement/v1/security_center_management.proto#L759-L761

Instead of

  // invalid. Note that a subsequent request to actually create the module could
  // still fail because:
  //  1. the state could have changed (e.g. IAM permission lost) or
  //  2. A failure occurred during creation of the module.

it should have list items without a leading space

  // invalid. Note that a subsequent request to actually create the module could
  // still fail because:
  // 1. the state could have changed (e.g. IAM permission lost) or
  // 2. A failure occurred during creation of the module.

See https://github.com/googleapis/google-cloud-python/actions/runs/7116287650/job/19374371114?pr=12089

We should add a linter rule to check for incorrect formatting of lists in proto comments via https://github.com/googleapis/api-linter .

parthea avatar Dec 06 '23 15:12 parthea