Harsh error behavior with bicepconfig.json files with unexpected types
- Dominant language
- Bicep
- Stars
- 3.6k
- Forks
- 830
- Avg merge
- 1d 21m
- Merged PRs (30d)
- 79
Description
# Repro 1
## bicepconfig.json
```json
{
"analyzers": "whoops"
}
```
## main.bicep
```bicep
param test string = 'abc'
```
Hover over param 'test' definition
!)
# Repro 2
Use this bicepconfig.json file:
```json
{
"analyzers": {
"core": {
"rules": {
"no-unused-params": {
"level": {
}
}
}
}
}
}
```
You get similar behavior
# Repro 3
The same happens from the command line:
# NOTE
Malformed JSON is handled better:
## bicepconfig.json
```json
{
```
gives
Contributor guide
Research direction
Start by reproducing the three cases using the bicepconfig.json and main.bicep examples, both through parameter hover and the command line. Compare unexpected JSON types with the existing malformed-JSON handling. Done means invalid configuration types produce a useful diagnostic or graceful error instead of the harsh behavior shown in the issue.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- json
- Domain
- devtools
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100