Back to all reviewers

Descriptive migration functions

hashicorp/terraform
Based on 2 comments
Shell

Name migration-related functions descriptively to convey their exact purpose and context of use. Include detailed documentation explaining when and how each function should be executed in the migration workflow. For example, instead of ambiguous names like `maintenancerelease`, use more specific terms like `setupBackportBranch` or `prepareMaintenanceBranch`...

Migrations Shell

Reviewer Prompt

Name migration-related functions descriptively to convey their exact purpose and context of use. Include detailed documentation explaining when and how each function should be executed in the migration workflow. For example, instead of ambiguous names like maintenancerelease, use more specific terms like setupBackportBranch or prepareMaintenanceBranch that clearly indicate the function’s purpose.

# BETTER:
# This function sets up a new maintenance branch for accepting backports
# Run this immediately after creating a branch for the previous minor version
function setupBackportBranch {
    # Function implementation
    # ...
}

# AVOID:
# function maintenancerelease {
#     # Unclear purpose without reading implementation
#     # ...
# }

Always include brief comments that explain why certain cleanup or setup steps are necessary, making it easier for others to understand and maintain the migration process.

2
Comments Analyzed
Shell
Primary Language
Migrations
Category

Source Discussions