Skip to content
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

chore(codegen): add checkstyle suppressions for preview modules #1455

Merged
merged 2 commits into from
Jan 13, 2023

Conversation

emmileaf
Copy link
Contributor

@emmileaf emmileaf commented Jan 12, 2023

This PR defines more specific checkstyle suppressions for generated modules in spring-cloud-previews adapted from #1449's commit 9036f7d. It looks like spring-cloud-gcp enforces stricter checkstyle rules (fail on warning) than what is used for the client libraries, and a number of abbreviation to lowerCamelCase edge cases are getting caught here.

  • AbbreviationAsWordInName suppressions - for abbreviations in service names that appear in generated class names (e.g. IDSSpringProperties) , as well as abbreviations in rpc method names (affecting retry-related generated code) such as the getOSPolicyAssignment method

  • MethodName and ParameterName suppressions - for abbreviations in service names, from lines such as this iAMClient bean method

List of affected starter modules:

  • google-cloud-os-config-spring-starter
  • google-cloud-ids-spring-starter
  • google-cloud-container-spring-starter
  • google-cloud-iamcredentials-spring-starter
  • google-iam-admin-spring-starter
  • google-cloud-gsuite-addons-spring-starter

Related PR: googleapis/sdk-platform-java#1245

for lowerCamelCase handling of abbreviations
Copy link
Contributor

@zhumin8 zhumin8 left a comment

Choose a reason for hiding this comment

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

Does it make sense to do AbbreviationAsWordInName suppression per module, or do we have many modules affected that blanket suppression works better?

@emmileaf
Copy link
Contributor Author

@zhumin8 That also makes sense, I was also debating between the two. Added in a new commit and updated the PR description to reflect this change.

@sonarqubecloud
Copy link

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
No Duplication information No Duplication information

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants