Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Coverage #237

Merged
merged 6 commits into from
Feb 24, 2020
Merged

Coverage #237

merged 6 commits into from
Feb 24, 2020

Conversation

Janther
Copy link
Contributor

@Janther Janther commented Feb 24, 2020

This PR solves an issue with try/catch discovered by adding more coverage cases and ups the coverage of src/nodes to a 100%

@Janther Janther mentioned this pull request Feb 24, 2020
@codecov
Copy link

codecov bot commented Feb 24, 2020

Codecov Report

Merging #237 into master will increase coverage by 0.47%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #237      +/-   ##
==========================================
+ Coverage   99.21%   99.68%   +0.47%     
==========================================
  Files          79       79              
  Lines         633      628       -5     
  Branches      106      104       -2     
==========================================
- Hits          628      626       -2     
+ Misses          5        2       -3
Impacted Files Coverage Δ
src/nodes/TupleExpression.js 100% <ø> (ø) ⬆️
src/parser.js 100% <100%> (ø) ⬆️
src/nodes/UsingForDeclaration.js 100% <100%> (+16.66%) ⬆️
src/nodes/LabelDefinition.js 100% <100%> (+25%) ⬆️
src/nodes/StateVariableDeclaration.js 100% <100%> (+10%) ⬆️
src/nodes/CatchClause.js 100% <100%> (ø) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 9bcb096...9968c8c. Read the comment docs.

Copy link
Member

@mattiaerre mattiaerre left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

awesome cleanup and so happy to see the code coverage going up 🔝

if (ctx.loopExpression) {
ctx.loopExpression.omitSemicolon = true;
}
ctx.loopExpression.omitSemicolon = true;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I guess that w/in ForStatements we always have a ctx.loopExpression right?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, the initial expression and the condition expression can be null but for some reason the loop expression is an expression with null content.
Maybe we can ask for some consistency but right now that’s how it is

@@ -6,15 +6,22 @@ const {

const printList = require('./print-list');

const parameters = (node, path, print) =>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

just noticing this right now, do we always use function expressions?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I tend to favour this notation. Is there an improvement by using declarations instead?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

not really, but to me, if it's a function I like to signal that w/ the function keyword

@mattiaerre mattiaerre merged commit 667a512 into master Feb 24, 2020
@mattiaerre mattiaerre deleted the coverage branch February 24, 2020 17:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants