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

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

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

   ## 
[Codecov](https://app.codecov.io/gh/apache/groovy/pull/2152?dropdown=coverage&src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)
 Report
   All modified and coverable lines are covered by tests :white_check_mark:
   > Project coverage is 68.8283%. Comparing base 
[(`2e7ae7c`)](https://app.codecov.io/gh/apache/groovy/commit/2e7ae7cb74e32df63b84cb5d930ce98063953ac6?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)
 to head 
[(`f3fb621`)](https://app.codecov.io/gh/apache/groovy/commit/f3fb6213b1dd47c4bbc0089f4f1dc7b721d1320e?dropdown=coverage&el=desc&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/2152/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/2152?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)
   
   ```diff
   @@                Coverage Diff                 @@
   ##               master      #2152        +/-   ##
   ==================================================
   + Coverage     68.8281%   68.8283%   +0.0003%     
     Complexity      29438      29438                
   ==================================================
     Files            1420       1420                
     Lines          113121     113122         +1     
     Branches        19542      19542                
   ==================================================
   + Hits            77859      77860         +1     
   + Misses          28728      28727         -1     
   - Partials         6534       6535         +1     
   ```
   
   | [Files with missing 
lines](https://app.codecov.io/gh/apache/groovy/pull/2152?dropdown=coverage&src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)
 | Coverage Δ | |
   |---|---|---|
   | 
[.../codehaus/groovy/runtime/DefaultGroovyMethods.java](https://app.codecov.io/gh/apache/groovy/pull/2152?src=pr&el=tree&filepath=src%2Fmain%2Fjava%2Forg%2Fcodehaus%2Fgroovy%2Fruntime%2FDefaultGroovyMethods.java&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-c3JjL21haW4vamF2YS9vcmcvY29kZWhhdXMvZ3Jvb3Z5L3J1bnRpbWUvRGVmYXVsdEdyb292eU1ldGhvZHMuamF2YQ==)
 | `73.3972% <100.0000%> (+0.0088%)` | :arrow_up: |
   
   ... and [4 files with indirect coverage 
changes](https://app.codecov.io/gh/apache/groovy/pull/2152/indirect-changes?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)
   
   </details>




> Create a sprintf shortcut for 1-arg usage
> -----------------------------------------
>
>                 Key: GROOVY-11569
>                 URL: https://issues.apache.org/jira/browse/GROOVY-11569
>             Project: Groovy
>          Issue Type: Improvement
>            Reporter: Paul King
>            Priority: Major
>
> Currently we support:
> {code:groovy}
> var x = 1/3
> assert sprintf('%5.3f', x) == '0.333'
> {code}
> Or you can use:
> {code:groovy}
> assert String.format('%5.3f', x) == '0.333'
> {code}
> I propose we also support:
> {code:groovy}
> assert x.sprintf('%5.3f') == '0.333'
> assert [x, x, x]*.sprintf('%5.3f') == ['0.333', '0.333', '0.333']
> {code}
> It is intended to be a shortcut only for format strings containing a single 
> format specifier (or at least referencing a single argument).



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

Reply via email to