-
Notifications
You must be signed in to change notification settings - Fork 23
Conversation
`validateFlags` was not differentiating between `0` and `undefined` which prevented `0` from being accepted as an input for integer based flags. `integer` did not include optional leading `-` preventing negative numbers from being accepted
Thanks for the contribution! Unfortunately we can't verify the commit author(s): Todd Brannam <t***@h***.com>. One possible solution is to add that email to your GitHub account. Alternatively you can change your commits to another email and force push the change. After getting your commits associated with your GitHub account, sign the Salesforce.com Contributor License Agreement and this Pull Request will be revalidated. |
Codecov Report
@@ Coverage Diff @@
## master #50 +/- ##
==========================================
+ Coverage 91.18% 91.35% +0.17%
==========================================
Files 11 11
Lines 329 324 -5
Branches 89 85 -4
==========================================
- Hits 300 296 -4
+ Misses 13 12 -1
Partials 16 16
Continue to review full report at Codecov.
|
Oh man, I opened #51 just a few hours after this! 😆I didn't see anything in the issues and didn't think to check the PRs, sorry! Could you add the additional tests I wrote to verify negative numbers and known failure cases (fractions and decimals) to this PR? Then I can close my PR. |
Sure thing. Will update my pr
…________________________________
From: Keith Wade <notifications@github.com>
Sent: Tuesday, May 7, 2019 11:31:25 AM
To: oclif/parser
Cc: Todd Brannam; Author
Subject: Re: [oclif/parser] Fix edge cases for integers flags (#50)
Oh man, I opened #51<#51> just a few hours after this! 😆I didn't see anything in the issues and didn't think to check the PRs, sorry!
Could you add the additional tests<https://github.com/oclif/parser/pull/51/files#diff-bb3e4eab90bca733bbd7a819227ba863R331> I wrote to verify negative numbers and known failure cases (fractions and decimals) to this PR? Then I can close my PR.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub<#50 (comment)>, or mute the thread<https://github.com/notifications/unsubscribe-auth/AAATHXNGQ7FVAYO6ESZRSDDPUGOE3ANCNFSM4HKUD4FA>.
|
Added tests from PR #51 to set edge cases for integer parsing
@keawade added your tests in |
@jdxcode, can we get a review please? 😄 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me!
@jdxcode seems to have left Heroku, are you still caring for this baby? |
@mattgraham maybe? He's the only publicly listed member of the oclif org. |
I'm no longer working on this project. @RasPhilCo and @elbandito should be able to assist |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good fix! 🏄
validateFlags
was not differentiating between0
andundefined
which prevented0
from being accepted as an input for integer based flags.integer
did not include optional leading-
preventing negative numbers from being accepted