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

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

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

   ## 
[Codecov](https://app.codecov.io/gh/apache/groovy/pull/2923?dropdown=coverage&src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)
 Report
   :white_check_mark: All modified and coverable lines are covered by tests.
   :white_check_mark: Project coverage is 71.2102%. Comparing base 
([`3eca1c9`](https://app.codecov.io/gh/apache/groovy/commit/3eca1c94b999d74d955407862a53d21bfbd9f7dd?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache))
 to head 
([`634a0d3`](https://app.codecov.io/gh/apache/groovy/commit/634a0d32ca9f4ada23579aa03df80a0eef80eb6c?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/2923/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/2923?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)
   
   ```diff
   @@                Coverage Diff                 @@
   ##               master      #2923        +/-   ##
   ==================================================
   + Coverage     71.2065%   71.2102%   +0.0038%     
   - Complexity      37721      37722         +1     
   ==================================================
     Files            1584       1584                
     Lines          136489     136493         +4     
     Branches        25358      25358                
   ==================================================
   + Hits            97189      97197         +8     
   + Misses          30538      30537         -1     
   + Partials         8762       8759         -3     
   ```
   
   | [Files with missing 
lines](https://app.codecov.io/gh/apache/groovy/pull/2923?dropdown=coverage&src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)
 | Coverage Δ | |
   |---|---|---|
   | 
[...java/org/codehaus/groovy/control/XStreamUtils.java](https://app.codecov.io/gh/apache/groovy/pull/2923?src=pr&el=tree&filepath=src%2Fmain%2Fjava%2Forg%2Fcodehaus%2Fgroovy%2Fcontrol%2FXStreamUtils.java&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-c3JjL21haW4vamF2YS9vcmcvY29kZWhhdXMvZ3Jvb3Z5L2NvbnRyb2wvWFN0cmVhbVV0aWxzLmphdmE=)
 | `51.2195% <100.0000%> (+5.2736%)` | :arrow_up: |
   
   ... and [10 files with indirect coverage 
changes](https://app.codecov.io/gh/apache/groovy/pull/2923/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>




> Add an inline Antlr4 parser covering-set with XML AST dumps
> -----------------------------------------------------------
>
>                 Key: GROOVY-12400
>                 URL: https://issues.apache.org/jira/browse/GROOVY-12400
>             Project: Groovy
>          Issue Type: Improvement
>            Reporter: Daniel Sun
>            Priority: Major
>
> The Antlr4 parser is covered mainly by resource files under 
> {{src/test-resources/core}} and {{fail}}, driven from {{GroovyParserTest}} 
> and {{SyntaxErrorTest}}.
> h3. Problem
> * Positive coverage is spread across many resource files, so a single grammar 
> production is hard to find and to pin down.
> * A successful {{CONVERSION}} is not the same as a correct AST: node type, 
> operators, and source positions can still be wrong.
> * Negative coverage often points at a file under {{fail/}} instead of locking 
> the caret diagnostic next to the snippet.
> h3. Approach
> Add two JUnit 5 classes distilled from the groovy-parser (Parrot) lab corpus, 
> with Groovy source inlined in each test method (the same shape as 
> {{SyntaxErrorTest}}'s missing-delimiter cases).
> * {{ParserPositiveSyntaxTest}} — valid snippets compiled through 
> {{CONVERSION}}. Assert a pretty-printed XML dump of the module AST, with 
> {{line}} / {{column}} / {{lastLine}} / {{lastColumn}} on every node 
> ({{AstXmlDumper}}).
> * {{ParserNegativeSyntaxTest}} — invalid snippets. Assert the full caret 
> diagnostic via {{expectParseError}}.
> * Helpers on {{TestUtils}}: {{parseModule}}, {{expectAst}}, {{dumpAst}}, 
> {{expectParseSuccess}}.
> Classic Groovy snippets were cross-checked against groovy-parser's Antlr2 
> parser. Constructs Antlr2 cannot parse (records, switch expressions, {{var}}, 
> {{outer.new Inner()}}, and similar Parrot additions) lock the Antlr4 AST.
> {{XStreamUtils.toXML}} is extracted as the in-memory form of 
> {{groovy.ast=xml}}. The covering-set dump is a compact XML visitor instead: 
> reflecting the whole {{ModuleNode}} graph is too noisy (and brittle on modern 
> JDKs) for inline assertions.



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

Reply via email to