-
Notifications
You must be signed in to change notification settings - Fork 764
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
Loop snippets #1647
Loop snippets #1647
Conversation
@@ -90,8 +111,9 @@ public override void VisitForSyntax(ForSyntax syntax) | |||
case null: | |||
// this is a property loop | |||
this.propertyLoopCount += 1; | |||
this.maximumPropertyLoopCount = Math.Max(this.maximumPropertyLoopCount, this.propertyLoopCount); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What's the purpose of maximumPropertyLoopCount
? It is assigned but its value doesn't seem to be used anywhere.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Was originally trying to implement this by partially running the same visitor logic. This was needed for that but I forgot to remove it when I found a simple way.
I'll remove it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Removed it
Codecov Report
@@ Coverage Diff @@
## main #1647 +/- ##
==========================================
- Coverage 95.15% 95.15% -0.01%
==========================================
Files 363 363
Lines 20098 20138 +40
Branches 13 13
==========================================
+ Hits 19125 19162 +37
- Misses 973 976 +3
Flags with carried forward coverage won't be shown. Click here to find out more.
|
Added loop snippets to simplify loop authoring. The completions that insert the snippets are always available on module/resource values. On property value completions, we only include the loop snippet completion if the property is of array type and the new property loop won't be nested under an existing one.
This fixes #1616.