[
https://issues.apache.org/jira/browse/GROOVY-12720?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18140084#comment-18140084
]
ASF GitHub Bot commented on GROOVY-12720:
-----------------------------------------
codecov-commenter commented on PR #3254:
URL: https://github.com/apache/groovy/pull/3254#issuecomment-6701350279
##
[Codecov](https://app.codecov.io/gh/apache/groovy/pull/3254?dropdown=coverage&src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)
Report
:x: Patch coverage is `80.00000%` with `1 line` in your changes missing
coverage. Please review.
:white_check_mark: Project coverage is 74.4030%. Comparing base
([`d020012`](https://app.codecov.io/gh/apache/groovy/commit/d02001286af335c8777fb9f5770e48ec4d07119f?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache))
to head
([`0884b38`](https://app.codecov.io/gh/apache/groovy/commit/0884b38ce4b1f788eeeb219ad60c108dc2a025c1?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/3254?dropdown=coverage&src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)
| Patch % | Lines |
|---|---|---|
|
[.../main/java/org/codehaus/groovy/ast/ModuleNode.java](https://app.codecov.io/gh/apache/groovy/pull/3254?src=pr&el=tree&filepath=src%2Fmain%2Fjava%2Forg%2Fcodehaus%2Fgroovy%2Fast%2FModuleNode.java&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-c3JjL21haW4vamF2YS9vcmcvY29kZWhhdXMvZ3Jvb3Z5L2FzdC9Nb2R1bGVOb2RlLmphdmE=)
| 80.0000% | [0 Missing and 1 partial :warning:
](https://app.codecov.io/gh/apache/groovy/pull/3254?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/3254?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)
```diff
@@ Coverage Diff @@
## master #3254 +/- ##
==================================================
+ Coverage 74.4010% 74.4030% +0.0020%
- Complexity 44345 44349 +4
==================================================
Files 1699 1699
Lines 150998 151002 +4
Branches 28770 28773 +3
==================================================
+ Hits 112344 112350 +6
+ Misses 28380 28377 -3
- Partials 10274 10275 +1
```
| [Files with missing
lines](https://app.codecov.io/gh/apache/groovy/pull/3254?dropdown=coverage&src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)
| Coverage Δ | |
|---|---|---|
|
[.../main/java/org/codehaus/groovy/ast/ModuleNode.java](https://app.codecov.io/gh/apache/groovy/pull/3254?src=pr&el=tree&filepath=src%2Fmain%2Fjava%2Forg%2Fcodehaus%2Fgroovy%2Fast%2FModuleNode.java&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-c3JjL21haW4vamF2YS9vcmcvY29kZWhhdXMvZ3Jvb3Z5L2FzdC9Nb2R1bGVOb2RlLmphdmE=)
| `88.2540% <80.0000%> (-0.1705%)` | :arrow_down: |
... and [9 files with indirect coverage
changes](https://app.codecov.io/gh/apache/groovy/pull/3254/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>
> Script: @Override on a script's own run() method is copied to the script
> class and rejected ("not allowed on element TYPE")
> ---------------------------------------------------------------------------------------------------------------------------
>
> Key: GROOVY-12720
> URL: https://issues.apache.org/jira/browse/GROOVY-12720
> Project: Groovy
> Issue Type: Bug
> Affects Versions: 6.0.0
> Reporter: Scott Murphy Heiberg
> Priority: Major
>
> A script may declare its own no-argument {{run()}}:
> {{ModuleNode.createStatementsClass}} keeps it instead of generating one, and
> copies its annotations to the script class so that, for example,
> {{@CompileStatic}} on {{run()}} applies to the whole class. Every annotation
> is copied, including {{@Override}}, whose only target is METHOD:
> {code:groovy}
> class PriceRules { int quotes = 0 }
> @Override
> Object run() {
> println new PriceRules().quotes
> null
> }
> {code}
> Expected: compiles and runs; the method does override
> {{groovy.lang.Script#run()}}. Actual, on 6.0.0 and master:
> {noformat}
> script.groovy: 5: Annotation @java.lang.Override is not allowed on element
> TYPE
> {noformat}
> The same script with {{@Deprecated}} compiles, and {{@Override}} on any other
> script method is checked as usual ("does not override method from its
> superclass").
> Proposed fix: when the method's annotations are copied to the class, leave
> {{@Override}} out; it stays on the method, where it is correct. The other
> annotations keep moving to the class as before.
> Found while scoring Groovy 6.0.0 code written by a language model: told that
> the file is compiled with static type checking, it declared the script's
> {{run()}} with {{@Override}} and {{@TypeChecked}}, and was given an error
> about an element it had not annotated.
--
This message was sent by Atlassian Jira
(v10.3.26#10030026)