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

Tech Debt: Standardize Naming Conventions in Go Code #13128

Closed
4 tasks
YakDriver opened this issue May 1, 2020 · 3 comments
Closed
4 tasks

Tech Debt: Standardize Naming Conventions in Go Code #13128

YakDriver opened this issue May 1, 2020 · 3 comments
Labels
proposal Proposes new design or functionality. provider Pertains to the provider itself, rather than any interaction with AWS. stale Old or inactive issues managed by automation, if no further action taken these will get closed. technical-debt Addresses areas of the codebase that need refactoring or redesign.

Comments

@YakDriver
Copy link
Member

YakDriver commented May 1, 2020

Community Note

  • Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request
  • Please do not leave "+1" or other comments that do not add relevant new information or questions, they generate extra noise for issue followers and do not help prioritize the request
  • If you are interested in working on this issue or have submitted a pull request, please leave a comment

Description

Several naming styles having cropped up in the AWS provider. I propose that conventions be adopted and that any non-conforming code be aligned.

Go Conventions

At this point, the AWS provider cannot adhere to standard Go conventions without starting a losing tech debt war. However, when choosing between equally plausible options, weight can be given to the Go conventions. The Go conventions are simple:

  • Use mixed caps instead of underscores (e.g., func queryResult() instead of func query_result())
  • An abbreviation should be all caps or all lowercase (e.g., func getIP() and func ipAddress() instead of func getIp() and func iPAddress())

Proposal

To minimize work to bring everything in conformity based on all the function and constant names in the AWS provider, some initial steps to bring the Terraform AWS provider to convention consistency:

  • Function names should be mixed case with a maximum of one underscore (1193 to fix).
  • The letter immediately after any underscore should be lowercase (2012 to fix).
  • "AWS" should be all caps or all lowercase, not mixed case (e.g., "testAWS" not "testAws", "awsTest" not "aWSTest") (4539 to fix).
  • All other abbreviations (except "AWS") should be mixed case (e.g., "getIam" not "getIAM") (2993 to fix).
@YakDriver YakDriver added the enhancement Requests to existing resources that expand the functionality or scope. label May 1, 2020
@github-actions github-actions bot added the needs-triage Waiting for first response or review from a maintainer. label May 1, 2020
@ewbankkit
Copy link
Contributor

@bflad bflad added proposal Proposes new design or functionality. provider Pertains to the provider itself, rather than any interaction with AWS. technical-debt Addresses areas of the codebase that need refactoring or redesign. and removed enhancement Requests to existing resources that expand the functionality or scope. labels May 4, 2020
@YakDriver YakDriver removed the needs-triage Waiting for first response or review from a maintainer. label Feb 26, 2021
@github-actions
Copy link

Marking this issue as stale due to inactivity. This helps our maintainers find and focus on the active issues. If this issue receives no comments in the next 30 days it will automatically be closed. Maintainers can also remove the stale label.

If this issue was automatically closed and you feel this issue should be reopened, we encourage creating a new issue linking back to this one for added context. Thank you!

@github-actions github-actions bot added the stale Old or inactive issues managed by automation, if no further action taken these will get closed. label Feb 17, 2023
@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Mar 19, 2023
@github-actions
Copy link

I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.
If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Apr 19, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
proposal Proposes new design or functionality. provider Pertains to the provider itself, rather than any interaction with AWS. stale Old or inactive issues managed by automation, if no further action taken these will get closed. technical-debt Addresses areas of the codebase that need refactoring or redesign.
Projects
None yet
Development

No branches or pull requests

3 participants