Azure / Azure/bicep

Improve error if `existing` goes in the wrong place

Open
#5,977 0 comments 0 reactions 0 assignees View on GitHub
enhancement error-message
Dominant language
Bicep
Stars
3.6k
Forks
830
Avg merge
1d 21m
Merged PRs (30d)
79

Description

**Is your feature request related to a problem? Please describe.**
I use `existing` enough to know the feature is there, but not enough to remember where exactly the `existing` keyword goes - I often find myself putting it after the equals sign.

**Describe the solution you'd like**
Could you detect this scenario and provide a more specific error message. (and maybe even a fix to move `existing` into the right place?
![image](https://user-images.githubusercontent.com/289860/154125997-b3826de0-fe15-4198-af7b-8990ac97147f.png)

Contributor guide

Open the contributing guide

Research direction

Reproduce the reported error in a minimal Bicep resource declaration, placing `existing` after the equals sign as described. Trace the parser or compiler diagnostic for the misplaced keyword; done means the scenario produces a specific, actionable error message, with relocation behavior included only if the project accepts it.

Written by the indexing model from the issue text.

Assessment

Tech stack
azure
Domain
compilers
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.