-
Notifications
You must be signed in to change notification settings - Fork 130
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
Fix VTODO validation for PERCENT-COMPLETE #664
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #664 +/- ##
=========================================
Coverage 98.78% 98.78%
Complexity 1875 1875
=========================================
Files 71 71
Lines 5273 5273
=========================================
Hits 5209 5209
Misses 64 64 ☔ View full report in Codecov by Sentry. |
@staabm this PR changes "PERCENT" to "PERCENT-COMPLETE" (which is the correct name in the RFC spec) If we merge this, then "PERCENT" will no longer be "officially" valid. But I suppose, if anybody has actually used it, "PERCENT" will just be an extra property that lives in some VTODO entries. It shouldn't break anything. Do we want to also keep validating "PERCENT"? |
Also, maybe a separate issue to address, I don't see any code that checks that the value of PERCENT-COMPLETE is an integer from 1 to 100. |
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.
Code is fine, thanks. I would like to get the opinion of @staabm also about the old "PERCENT"
I can't say much about it. this PR seems to align our impl with the RFC which feels like a good thing. I don't know whether the previous impl is wrong though (or intentionally made like that for some unknown reason). |
Actually, I don't think it really matters. For anyone currently using "PERCENT", it will still work. So they won't notice a difference. For the clients that do the correct thing, and use "PERCENT-COMPLETE", they also will be fine, as long as they only specify it once, as per the spec. |
is this something we should test? |
yes, I have a test case and it passes. The VTodo validation code does not complain about unrecognized properties. |
thank you both! |
This PR should fix the linked issue I created about the
PERCENT-COMPLETE
property of theVTODO
being misspelled as justPERCENT
. I also added a test to verify that the validation of the property now works as expected. If you think the test is unnecessary, I can also just remove it again.Fixes #663