[
https://issues.apache.org/jira/browse/GROOVY-11690?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17955649#comment-17955649
]
ASF GitHub Bot commented on GROOVY-11690:
-----------------------------------------
codecov-commenter commented on PR #2246:
URL: https://github.com/apache/groovy/pull/2246#issuecomment-2930052621
##
[Codecov](https://app.codecov.io/gh/apache/groovy/pull/2246?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 69.0456%. Comparing base
[(`e42a2a7`)](https://app.codecov.io/gh/apache/groovy/commit/e42a2a7dc3973a9c4007c4247e58360e95d02e5c?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)
to head
[(`a07b49f`)](https://app.codecov.io/gh/apache/groovy/commit/a07b49f972b0a15f414c683c17e04601ef743942?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>
[](https://app.codecov.io/gh/apache/groovy/pull/2246?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)
```diff
@@ Coverage Diff @@
## master #2246 +/- ##
==================================================
+ Coverage 69.0395% 69.0456% +0.0061%
- Complexity 29709 29712 +3
==================================================
Files 1423 1423
Lines 114407 114407
Branches 19842 19842
==================================================
+ Hits 78986 78993 +7
+ Misses 28788 28784 -4
+ Partials 6633 6630 -3
```
| [Files with missing
lines](https://app.codecov.io/gh/apache/groovy/pull/2246?dropdown=coverage&src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)
| Coverage Δ | |
|---|---|---|
|
[...n/java/org/codehaus/groovy/control/SourceUnit.java](https://app.codecov.io/gh/apache/groovy/pull/2246?src=pr&el=tree&filepath=src%2Fmain%2Fjava%2Forg%2Fcodehaus%2Fgroovy%2Fcontrol%2FSourceUnit.java&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-c3JjL21haW4vamF2YS9vcmcvY29kZWhhdXMvZ3Jvb3Z5L2NvbnRyb2wvU291cmNlVW5pdC5qYXZh)
| `71.9512% <100.0000%> (-1.2195%)` | :arrow_down: |
... and [3 files with indirect coverage
changes](https://app.codecov.io/gh/apache/groovy/pull/2246/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>
> Slightly expanded error messages
> --------------------------------
>
> Key: GROOVY-11690
> URL: https://issues.apache.org/jira/browse/GROOVY-11690
> Project: Groovy
> Issue Type: Improvement
> Reporter: Paul King
> Assignee: Paul King
> Priority: Major
>
> Consider the following script (with intentional errors since we can't
> multiply strings):
> {code:groovy}
> @TypeChecked
> def method() {
> def alphabet = 'abcdefghijklmnopqrstuvwxyz0123456789'
> def alphabet2 = 'abcdefghijklmnopqrstuvwxyz0123456789' *
> 'abcdefghijklmnopqrstuvwxyz'
> def alphabet3 = 'abcdefghijklmnopqrstuvwxyz0123456789' + '' *
> 'abcdefghijklmnopqrstuvwxyz'
> }
> {code}
> When reporting on the first error we don't truncate at all:
> {noformat}
> [Static type checking] - Cannot find matching method
> java.lang.String#multiply(java.lang.String). Please check...
> @ line 4, column 21.
> def alphabet2 = 'abcdefghijklmnopqrstuvwxyz0123456789' *
> 'abcdefghijklmnopqrstuvwxyz'
> ^
> {noformat}
> For the second, since the error position is above position 40, we shrink the
> output taking 30 chars before and (up to) 10 after the position where the
> error occurs. It becomes quite minimal context and seems a quite drastic
> truncation given we don't care how long the above non-truncated string may be:
> {noformat}
> [Static type checking] - Cannot find matching method
> java.lang.String#multiply(java.lang.String). Please check...
> @ line 5, column 62.
> klmnopqrstuvwxyz0123456789' + '' * 'abcd
> ^
> {noformat}
> This kind of truncation was possibly justified when we were thinking of 80 x
> 24 terminals as our lowest common denominator for screen real estate, but
> seems a little excessive these days.
> Instead of 40, 30 and 10, I propose we use 60, 45 and 25, a very modest
> increase. This then gives a little more context:
> {noformat}
> [Static type checking] - Cannot find matching method
> java.lang.String#multiply(java.lang.String). Please check...
> @ line 5, column 62.
> 3 = 'abcdefghijklmnopqrstuvwxyz0123456789' + '' * 'abcdefghijklmnopqrs
> ^
> {noformat}
> I am open to further discussion about what the correct numbers should be but
> the above suggestion seemed to be a "no-brainer" as a little improvement.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)