Skip to content

Add description to module name property for improved IntelliSense#19310

Merged
shenglol merged 2 commits intoAzure:mainfrom
brendandburns:intellisense
Apr 1, 2026
Merged

Add description to module name property for improved IntelliSense#19310
shenglol merged 2 commits intoAzure:mainfrom
brendandburns:intellisense

Conversation

@brendandburns
Copy link
Copy Markdown
Member

@brendandburns brendandburns commented Mar 31, 2026

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

@shenglol shenglol merged commit 6927099 into Azure:main Apr 1, 2026
76 of 81 checks passed
@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Apr 1, 2026

Test this change out locally with the following install scripts (Action run 23828762339)

VSCode
  • Mac/Linux
    bash <(curl -Ls https://aka.ms/bicep/nightly-vsix.sh) --run-id 23828762339
  • Windows
    iex "& { $(irm https://aka.ms/bicep/nightly-vsix.ps1) } -RunId 23828762339"
Azure CLI
  • Mac/Linux
    bash <(curl -Ls https://aka.ms/bicep/nightly-cli.sh) --run-id 23828762339
  • Windows
    iex "& { $(irm https://aka.ms/bicep/nightly-cli.ps1) } -RunId 23828762339"

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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants