Improve error when parameter name & type are given the wrong way around
- 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.**
Coming from a C# background, I constantly find myself writing the following
```bicep
param string foo
```
**Describe the solution you'd like**
It would be really nice if bicep could detect these scenarios where the type and value are the wrong way around. (specifically when the type is invalid, but the variable name is a valid type), and highlight that as a specific error (and with a code fix)

i.e. the error message could say something like:
> Did you mean `param foo string`
Contributor guide
Research direction
Reproduce the declaration `param string foo` and compare it with the intended `param foo string` form. Trace the parameter declaration diagnostic and code-fix entry points, then verify that the wrong ordering receives a specific “Did you mean” correction without changing valid declarations.
Written by the indexing model from the issue text.
Assessment
- Domain
- compilers
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100