Back to all reviewers

Externalize configuration values

Azure/azure-sdk-for-net
Based on 4 comments
Yaml

Store configuration values (URLs, demands, pool names) in centralized variables rather than hardcoding them inline. This improves maintainability, ensures consistency across the codebase, and simplifies future updates. When possible, group related configurations in dedicated template files or variable groups.

Configurations Yaml

Reviewer Prompt

Store configuration values (URLs, demands, pool names) in centralized variables rather than hardcoding them inline. This improves maintainability, ensures consistency across the codebase, and simplifies future updates. When possible, group related configurations in dedicated template files or variable groups.

Example:

# Instead of:
pool:
  name: $(WINDOWSPOOL)
  demands: ImageOverride -equals $(WINDOWSVMIMAGE)

# Prefer:
pool:
  name: $(WINDOWSPOOL)
  demands: $(IMAGE_DEMAND)

variables:
  - name: IMAGE_DEMAND
    value: ImageOverride -equals $(WINDOWSVMIMAGE)

For API endpoints, pipeline definitions, and other configuration values that may change over time, always use variables rather than hardcoding values directly in scripts or pipeline definitions.

4
Comments Analyzed
Yaml
Primary Language
Configurations
Category

Source Discussions