-
Notifications
You must be signed in to change notification settings - Fork 756
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
use-resource-id-functions
linter rule not spotting if
conditional that is wrapped in parens ( )
#8410
Comments
Possibly another false positive. Thanks for reporting. |
@alex-frankel no problem, anytime. Any thoughts on the uses of parentheses Maybe another linter rule idea "unrequired parentheses" etc.? |
tagging @DaFitRobsta for PR awareness in ALZ-Bicep |
Oh sorry I missed that piece. These parens are a no-op, so I would recommend removing them. I agree this would be a helpful linter rule. |
use-resource-id-functions
linter rule not spotting if
conditional that is wrapped in brackets ( )
use-resource-id-functions
linter rule not spotting if
conditional that is wrapped in parens ( )
No worries, thanks for the rapid response. We'll update our code our end in ALZ-Bicep. But this is still a bug that we probably want to handle on this linter rule. Do you want me to open a new issue for the new suggestion of the linter rule? |
I'm going to add triage back and we can discuss it next week. I'm not sure if we should do one or the other or both. |
Parens shouldn't matter, think it should be noticing the use of tenant().tenantId anywhere in the expression. |
Dup of #8104 (but thanks for reporting) |
Reopening since there is something weird going on with the parens... |
Bicep version
0.10.61
Describe the bug
use-resource-id-functions
linter rule not spottingif
conditional that is wrapped in brackets( )
Error message:
If property "id" represents a resource ID, it must use a symbolic resource reference, be a parameter or start with one of these functions: extensionResourceId, guid, if, reference, resourceId, subscription, subscriptionResourceId, tenantResourceId.
To Reproduce
See snippet below
Additional context
Should we be wrapping the
if
conditional in brackets( )
, struggling to find do/dont's? Around this anywhere in docs?The text was updated successfully, but these errors were encountered: