-
Notifications
You must be signed in to change notification settings - Fork 459
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Feature Request]: Handle new Bicep linter warning prefer-unquoted-property-names
#1664
Comments
Team decided not to follow the linter recommendation. To still not be bothered by this warning, a bicep config file needs to be set up. |
Hi @rahalan, |
Hey @itpropro, In the {
"analyzers": {
"core": {
"rules": {
(..)
"prefer-unquoted-property-names": {
"level": "off" // Reason: This complains primarily about RBAC roles which are all in quotes to be consistent within the list of roles with and without spaces in their name
}
}
}
}
}
However, @eriqua provided the alternative suggestion to a ignore rules in the RBAC files instead. This would mean 4/5 lines per file, but we could keep the linter rule for everyhing else active - as it is a good rule. |
Attached a Draft PR for reference |
I think the suggestion from @eriqua for a ignore rules in the RBAC files is a good compromise. This way, customers are still able to use their own linter rules and can keep their linter configs intact without getting warnings thrown. |
Team decides to go with the rule and remove quotes on single strings. |
Description
Recently, a new Bicep linter warning
prefer-unquoted-property-names
was introduced which leads to a large amount of warnings regarding our modules.The primary reason are our nested RBAC modules (
nested_roleAssignments.bicep
) as they contain a map of RoleName - RoleID mappings, and the RoleName is always formatted as a string.This was originally done to make the list easy to read (i.e., consistent formatting), but we may want to revisit that decision now.
For the time being, with PR #1632, the warning is disabled. If we want to enable it again, we should make sure all our modules align with the new rule.
cc: @itpropro
The text was updated successfully, but these errors were encountered: