[ 
https://issues.apache.org/jira/browse/GROOVY-10683?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17939496#comment-17939496
 ] 

ASF GitHub Bot commented on GROOVY-10683:
-----------------------------------------

codecov-commenter commented on PR #2169:
URL: https://github.com/apache/groovy/pull/2169#issuecomment-2764625268

   ## 
[Codecov](https://app.codecov.io/gh/apache/groovy/pull/2169?dropdown=coverage&src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)
 Report
   Attention: Patch coverage is `96.55172%` with `1 line` in your changes 
missing coverage. Please review.
   > Project coverage is 68.8440%. Comparing base 
[(`6ce967f`)](https://app.codecov.io/gh/apache/groovy/commit/6ce967f8019f175e589e71873f025b0a16bb0a13?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)
 to head 
[(`8261b96`)](https://app.codecov.io/gh/apache/groovy/commit/8261b961f651bbb0a02e949482b72fd9dd5c64f2?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache).
   
   | [Files with missing 
lines](https://app.codecov.io/gh/apache/groovy/pull/2169?dropdown=coverage&src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)
 | Patch % | Lines |
   |---|---|---|
   | 
[...va/org/apache/groovy/parser/antlr4/AstBuilder.java](https://app.codecov.io/gh/apache/groovy/pull/2169?src=pr&el=tree&filepath=src%2Fmain%2Fjava%2Forg%2Fapache%2Fgroovy%2Fparser%2Fantlr4%2FAstBuilder.java&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-c3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2dyb292eS9wYXJzZXIvYW50bHI0L0FzdEJ1aWxkZXIuamF2YQ==)
 | 94.4444% | [0 Missing and 1 partial :warning: 
](https://app.codecov.io/gh/apache/groovy/pull/2169?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)
 |
   
   <details><summary>Additional details and impacted files</summary>
   
   
   [![Impacted file tree 
graph](https://app.codecov.io/gh/apache/groovy/pull/2169/graphs/tree.svg?width=650&height=150&src=pr&token=1r45138NfQ&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)](https://app.codecov.io/gh/apache/groovy/pull/2169?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)
   
   ```diff
   @@                Coverage Diff                 @@
   ##               master      #2169        +/-   ##
   ==================================================
   - Coverage     68.8443%   68.8440%   -0.0003%     
   + Complexity      29533      29532         -1     
   ==================================================
     Files            1421       1421                
     Lines          113424     113426         +2     
     Branches        19644      19644                
   ==================================================
   + Hits            78086      78087         +1     
   - Misses          28754      28757         +3     
   + Partials         6584       6582         -2     
   ```
   
   | [Files with missing 
lines](https://app.codecov.io/gh/apache/groovy/pull/2169?dropdown=coverage&src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)
 | Coverage Δ | |
   |---|---|---|
   | 
[...ava/org/codehaus/groovy/ast/stmt/ForStatement.java](https://app.codecov.io/gh/apache/groovy/pull/2169?src=pr&el=tree&filepath=src%2Fmain%2Fjava%2Forg%2Fcodehaus%2Fgroovy%2Fast%2Fstmt%2FForStatement.java&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-c3JjL21haW4vamF2YS9vcmcvY29kZWhhdXMvZ3Jvb3Z5L2FzdC9zdG10L0ZvclN0YXRlbWVudC5qYXZh)
 | `100.0000% <100.0000%> (ø)` | |
   | 
[...va/org/apache/groovy/parser/antlr4/AstBuilder.java](https://app.codecov.io/gh/apache/groovy/pull/2169?src=pr&el=tree&filepath=src%2Fmain%2Fjava%2Forg%2Fapache%2Fgroovy%2Fparser%2Fantlr4%2FAstBuilder.java&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-c3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2dyb292eS9wYXJzZXIvYW50bHI0L0FzdEJ1aWxkZXIuamF2YQ==)
 | `86.6370% <94.4444%> (+0.0119%)` | :arrow_up: |
   
   ... and [5 files with indirect coverage 
changes](https://app.codecov.io/gh/apache/groovy/pull/2169/indirect-changes?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)
   
   </details>
   <details><summary> :rocket: New features to boost your workflow: </summary>
   
   - :snowflake: [Test 
Analytics](https://docs.codecov.com/docs/test-analytics): Detect flaky tests, 
report on failures, and find test suite problems.
   - :package: [JS Bundle 
Analysis](https://docs.codecov.com/docs/javascript-bundle-analysis): Save 
yourself from yourself by tracking and limiting bundle sizes in JS merges.
   </details>




> Consider enhancing for loop to provide access to loop index or iterator
> -----------------------------------------------------------------------
>
>                 Key: GROOVY-10683
>                 URL: https://issues.apache.org/jira/browse/GROOVY-10683
>             Project: Groovy
>          Issue Type: New Feature
>          Components: parser-antlr4
>            Reporter: Eric Milles
>            Priority: Minor
>
> When iterating over an array or iterable, there is choice between traditional 
> counting loop for index access, declaring/managing an external variable to 
> leverage for-each loop, or switching to {{eachWithIndex}} which requires 
> quite a bit more runtime investment.
> {code:groovy}
> for (int i = 0, n = array.length; i < n; i += 1) {
>   def val = array[i]
> }
> int idx = 0; for (val in array) {
>   idx += 1;
> }
> // idiomatic and takes care of all the management, but lacks STC support for 
> primitive arrays and adds the cost of method invocation for each iteration
> array.eachWithIndex { val, idx ->
> }
> {code}
> Please consider the possibility of {{for}} loop enhancements of 
> [Gosu|https://gosu-lang.github.io/docs.html], which provides a direct syntax 
> for index or iterator:
> {code}
> for (val in array index idx) {
>   println "$idx: $val"
> }
> for (value in iterable iterator iter) { // could be ListIterator for List 
> types, which increases options
>   iter.remove() // for example
> }
> {code}



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to