[ https://issues.apache.org/jira/browse/GROOVY-11688?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17955468#comment-17955468 ]
ASF GitHub Bot commented on GROOVY-11688: ----------------------------------------- codecov-commenter commented on PR #2244: URL: https://github.com/apache/groovy/pull/2244#issuecomment-2926467927 ## [Codecov](https://app.codecov.io/gh/apache/groovy/pull/2244?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 `72.22222%` with `5 lines` in your changes missing coverage. Please review. > Project coverage is 69.0439%. Comparing base [(`6f97a5b`)](https://app.codecov.io/gh/apache/groovy/commit/6f97a5bc6ef82887b84fccc4e08372b93739e582?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) to head [(`ffa1af1`)](https://app.codecov.io/gh/apache/groovy/commit/ffa1af10a874718cc39ee7972c140cb917f9a93d?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache). > Report is 1 commits behind head on master. | [Files with missing lines](https://app.codecov.io/gh/apache/groovy/pull/2244?dropdown=coverage&src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | Patch % | Lines | |---|---|---| | [...roovy/transform/stc/StaticTypeCheckingVisitor.java](https://app.codecov.io/gh/apache/groovy/pull/2244?src=pr&el=tree&filepath=src%2Fmain%2Fjava%2Forg%2Fcodehaus%2Fgroovy%2Ftransform%2Fstc%2FStaticTypeCheckingVisitor.java&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-c3JjL21haW4vamF2YS9vcmcvY29kZWhhdXMvZ3Jvb3Z5L3RyYW5zZm9ybS9zdGMvU3RhdGljVHlwZUNoZWNraW5nVmlzaXRvci5qYXZh) | 72.2222% | [1 Missing and 4 partials :warning: ](https://app.codecov.io/gh/apache/groovy/pull/2244?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> [](https://app.codecov.io/gh/apache/groovy/pull/2244?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) ```diff @@ Coverage Diff @@ ## master #2244 +/- ## ============================================= Coverage 69.0438% 69.0439% - Complexity 29710 29712 +2 ============================================= Files 1423 1423 Lines 114407 114420 +13 Branches 19841 19846 +5 ============================================= + Hits 78991 79000 +9 Misses 28785 28785 - Partials 6631 6635 +4 ``` | [Files with missing lines](https://app.codecov.io/gh/apache/groovy/pull/2244?dropdown=coverage&src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | Coverage Δ | | |---|---|---| | [...roovy/transform/stc/StaticTypeCheckingVisitor.java](https://app.codecov.io/gh/apache/groovy/pull/2244?src=pr&el=tree&filepath=src%2Fmain%2Fjava%2Forg%2Fcodehaus%2Fgroovy%2Ftransform%2Fstc%2FStaticTypeCheckingVisitor.java&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-c3JjL21haW4vamF2YS9vcmcvY29kZWhhdXMvZ3Jvb3Z5L3RyYW5zZm9ybS9zdGMvU3RhdGljVHlwZUNoZWNraW5nVmlzaXRvci5qYXZh) | `87.4825% <72.2222%> (-0.0668%)` | :arrow_down: | ... and [3 files with indirect coverage changes](https://app.codecov.io/gh/apache/groovy/pull/2244/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> > Potential minor improvement to STC error message > ------------------------------------------------ > > Key: GROOVY-11688 > URL: https://issues.apache.org/jira/browse/GROOVY-11688 > Project: Groovy > Issue Type: Improvement > Reporter: Paul King > Assignee: Paul King > Priority: Major > > Currently for named args we report the error on the "whole map" of args > rather than a specific one if a problem is found for a specific one. > {code:groovy} > import groovy.transform.* > @Immutable(copyWith = true) > class DoctorWho { > String first, last > Integer number > } > @TypeChecked > def method() { > def dr4 = new DoctorWho(first: 'Tom', last: 'Baker', number: 4, born: > 1934) > def dr6 = dr4.copyWith(first: 'Colin', number: 'six') > println dr4 > println dr6 > } > method() > {code} > We see an error like this: > {noformat} > DrWhoScript.groovy: 11: [Static type checking] - unexpected named arg: born > @ line 11, column 29. > def dr4 = new DoctorWho(first: 'Tom', last: 'Baker', number: 4, born: > 1934) > ^ > DrWhoScript.groovy: 12: [Static type checking] - argument for named param > 'number' has type 'java.lang.String' but expected 'java.lang.Integer'. > @ line 12, column 28. > def dr6 = dr4.copyWith(first: 'Colin', number: 'six') > ^ > 2 errors > {noformat} > This issue proposes it changes to this: > {noformat} > DrWhoScript.groovy: 11: [Static type checking] - unexpected named arg: born > @ line 11, column 69. > m', last: 'Baker', number: 4, born: 1934 > ^ > DrWhoScript.groovy: 12: [Static type checking] - argument for named param > 'number' has type 'java.lang.String' but expected 'java.lang.Integer'. > @ line 12, column 44. > dr4.copyWith(first: 'Colin', number: 's > ^ > 2 errors > {noformat} -- This message was sent by Atlassian Jira (v8.20.10#820010)