Incorrect interpretation of '' in Bicep parameter.
- Dominant language
- Bicep
- Stars
- 3.6k
- Forks
- 830
- Avg merge
- 1d 21m
- Merged PRs (30d)
- 79
Description
**Bicep version**
az bicep version
Bicep CLI version 0.4.1318 (ee0d808f35)
**Describe the bug**
A clear and concise description of what the bug is vs what you expected to happen
Linter shows warning when used '' in if-else condition for evaluation. Linter should interprete '' as null and not show warning.
**To Reproduce**
Steps to reproduce the behavior:
@allowed([
'AAD'
'PrivateLink'
''
])
param allowedCopyScope string = ''
When used with the if-else condition in resource or variable, linter shows following warning. see screenshot -
allowedCopyScope: ((allowedCopyScope == '' ) ? null : allowedCopyScope)

allowedCopyScope: ((allowedCopyScope == null ) ? null : allowedCopyScope)

Contributor guide
Assessment
This issue has not been assessed yet.