Add description to module name property for improved IntelliSense#19310
Merged
shenglol merged 2 commits intoAzure:mainfrom Apr 1, 2026
Merged
Add description to module name property for improved IntelliSense#19310shenglol merged 2 commits intoAzure:mainfrom
shenglol merged 2 commits intoAzure:mainfrom
Conversation
majastrz
approved these changes
Mar 31, 2026
Contributor
|
Test this change out locally with the following install scripts (Action run 23828762339) VSCode
Azure CLI
|
Copilot AI
pushed a commit
that referenced
this pull request
Apr 1, 2026
…9310) ## Summary This PR adds a human-readable description to the `name` property on module/test declarations so that IntelliSense (hover info, completions) surfaces helpful guidance about the deployment name constraints. ## Changes In `src/Bicep.Core/LanguageConstants.cs`: - Added a `nameDescription` string ("The deployment name. Must be 1-64 characters, and can contain alphanumerics, underscores, parentheses, hyphens, and periods.") and passed it to the `NamedTypeProperty` constructor for the module name property in both `CreateModuleType` and the test/extension common properties. This ensures that when users hover over or complete the `name` property in a module or test block, they see the allowed pattern and length constraints directly in the editor. ###### Microsoft Reviewers: [Open in CodeFlow](https://microsoft.github.io/open-pr/?codeflow=https://github.com/Azure/bicep/pull/19310) Co-authored-by: brendandburns <5751682+brendandburns@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This PR adds a human-readable description to the
nameproperty on module/test declarations so that IntelliSense (hover info, completions) surfaces helpful guidance about the deployment name constraints.Changes
In
src/Bicep.Core/LanguageConstants.cs:nameDescriptionstring ("The deployment name. Must be 1-64 characters, and can contain alphanumerics, underscores, parentheses, hyphens, and periods.") and passed it to theNamedTypePropertyconstructor for the module name property in bothCreateModuleTypeand the test/extension common properties.This ensures that when users hover over or complete the
nameproperty in a module or test block, they see the allowed pattern and length constraints directly in the editor.Microsoft Reviewers: Open in CodeFlow