Back to all reviewers

Parameterize configuration values

dotnet/runtime
Based on 3 comments
Yaml

Extract hard-coded configuration values into variables, parameters, or templates to improve reusability and simplify maintenance. When the same value is used in multiple places or might need to change in the future, define it once and reference it throughout your configuration files.

Configurations Yaml

Reviewer Prompt

Extract hard-coded configuration values into variables, parameters, or templates to improve reusability and simplify maintenance. When the same value is used in multiple places or might need to change in the future, define it once and reference it throughout your configuration files.

Examples:

  1. For build scripts with multiple parameters: ```yaml

    Instead of:

    • script: make run TARGET_ARCH=arm64 DEPLOY_AND_RUN=false RUNTIME_FLAVOR=CoreCLR STATIC_LINKING=true

Use:

  • script: make run TARGET_ARCH=$ DEPLOY_AND_RUN=$ RUNTIME_FLAVOR=$ STATIC_LINKING=$ ```
  1. For repeated configuration values: ```yaml

    Define once:

    variables: timeoutPerTestCollection: 180

Reference where needed:

jobParameters: timeoutInMinutes: $ ```

This practice reduces duplication, centralizes configuration management, and makes future updates more efficient and less error-prone.

3
Comments Analyzed
Yaml
Primary Language
Configurations
Category

Source Discussions