Skip to content

feat: introduces spec for typed variables#2129

Closed
ReneHezser wants to merge 2 commits intomainfrom
variable-types
Closed

feat: introduces spec for typed variables#2129
ReneHezser wants to merge 2 commits intomainfrom
variable-types

Conversation

@ReneHezser
Copy link
Contributor

@ReneHezser ReneHezser commented Jun 13, 2025

Overview/Summary

In Bicep, variables should have a type.

AB#41075

This PR fixes/adds/changes/removes

Breaking Changes

None

As part of this Pull Request I have

  • Read the Contribution Guide and ensured this PR is compliant with the guide
  • Checked for duplicate Pull Requests
  • Associated it with relevant GitHub Issues or ADO Work Items (Internal Only)
  • Ensured my code/branch is up-to-date with the latest changes in the main branch
  • Ensured PR tests are passing
  • Updated relevant and associated documentation (e.g. Contribution Guide, Docs etc.)

@ReneHezser ReneHezser requested a review from a team as a code owner June 13, 2025 06:55
@microsoft-github-policy-service microsoft-github-policy-service bot added the Needs: Triage 🔍 Maintainers need to triage still label Jun 13, 2025
@ReneHezser ReneHezser enabled auto-merge (squash) June 13, 2025 06:55
Copy link
Contributor

Choose a reason for hiding this comment

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

My comments from this PR apply here: #2131

Seems you have accidently carried both changes into the other PR.

Copy link
Contributor

Choose a reason for hiding this comment

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

Quote:

Question: Variables don't need an explicit type and this change would require all modules to be updated. Is there a good reason for this?
Why would we want to do that? You can also explicitely specify the type of every single variable in PowerShell - yet you'd only want to do this for parameters.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks. Fixed that. Long day :-(


## ID: BCPNRF23 - Category: Composition - Code Styling - Typed Variables

A `type` **SHOULD** be defined for every variable and be as precise as possible.
Copy link
Contributor

Choose a reason for hiding this comment

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

Just had a chat about that in the Bicep call suggesting to change this to a 'MAY'. Thoughts?

@ReneHezser ReneHezser closed this Jul 23, 2025
auto-merge was automatically disabled July 23, 2025 06:21

Pull request was closed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Needs: Triage 🔍 Maintainers need to triage still

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants