Azure / Azure/bicep

`targetScope` does not show up in the document outline view

Open
#8,450 0 comments 0 reactions 0 assignees View on GitHub
bug
Dominant language
Bicep
Stars
3.6k
Forks
830
Avg merge
1d 21m
Merged PRs (30d)
79

Description

**Bicep version**
Any

**Describe the bug**
`targetScope` is an element of the document that should be present in the outline.

**To Reproduce**
```bicep
targetScope = 'managementGroup'
param test string
```

The above produces this document outline in VS code:
image

**Additional context**
The bug exists because we use symbols to populate the response in the document symbols handler.

Contributor guide

Open the contributing guide

Research direction

Start by reproducing the example in VS Code and inspect the document symbols handler, which the issue identifies as the source of the outline response. Verify how symbols are collected and confirm that the completed change makes targetScope appear in the document outline alongside the parameter.

Written by the indexing model from the issue text.

Assessment

Tech stack
vscode
Domain
tooling
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.