Azure / Azure/bicep

Completions not working in an un-terminated object

Open
#3,569 1 comment 0 reactions 0 assignees View on GitHub
bug
Dominant language
Bicep
Stars
3.6k
Forks
830
Avg merge
1d 4h
Merged PRs (30d)
81

Description

Created from this sample: https://github.com/Azure/bicep/pull/3510#issuecomment-878601832

In the following example, we have an unmatched set of closing `}` braces, which causes a syntax error. Because this causes a syntax error, Bicep is unable to correctly offer property completions (cursor represented by `|`), and syntax highlighting also shows up incorrectly:
```bicep
resource test 'Microsoft.Authorization/policyAssignments@2018-05-01' = {
name: 'asdfsd'
properties: {
policyDefinitionId: policy.|
}
```

Tested with Bicep v0.4.63

Contributor guide

Open the contributing guide

Research direction

Reproduce the issue with the Bicep snippet in the report, including the unmatched closing brace and the completion cursor after `policy.`. Start by tracing how syntax errors affect property completions and syntax highlighting. Done means the example offers the expected property completions and displays syntax highlighting correctly despite the incomplete object.

Written by the indexing model from the issue text.

Assessment

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.