-
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
Permit newline breaks in ternary (a ? b : c
), for
and if
statements
#5829
Comments
How could look with both if and for
|
Is this something that's on the roadmap? |
@anthony-c-martin is there any plans to continue the multi-line work for ternary operators and if statements? |
Hi anthony-c-martin, this issue has been marked as stale because it was labeled as requiring author feedback but has not had any activity for 4 days. It will be closed if no further activity occurs within 3 days of this comment. Thanks for contributing to bicep! 😄 🦾 |
@anthony-c-martin @alex-frankel can this be re-opened? It is not completed and actually I have recently asked for status. |
Another case to add here is the lambdas: Lambda(a, b, c) => '${a}-${b}-${c}'
(a, b, c) =>
'${a}-${b}-${c}' This is somewhat related to the prettier formatter. I'd be interested in implementing this. Progress:
|
…or-expression (#10984) Partially addresses #5829. ###### Microsoft Reviewers: [Open in CodeFlow](https://portal.fabricbot.ms/api/codeflow?pullrequest=https://github.com/Azure/bicep/pull/10984)
…sensitive (#11052) Closes #5829. ###### Microsoft Reviewers: [Open in CodeFlow](https://portal.fabricbot.ms/api/codeflow?pullrequest=https://github.com/Azure/bicep/pull/11052)
I note a difference in the ternary implementation from #5829 (comment)
The supported syntax ended up being the following instead.
|
@shenglol it seems new line does not work inside for(). Below gives error and it is not the same if you do not use for().
|
@shenglol also does not work on module names |
Created from discussion in #146
If, For and Ternary statements often end up taking up a lot of horizontal space, and it would be nice to have the freedom to use line breaks to avoid this in Bicep. See below for some mockups.
Ternary
If
For
The text was updated successfully, but these errors were encountered: