Closed (fixed)
Project:
Drupal.org security advisory coverage applications
Component:
module
Priority:
Normal
Category:
Task
Assigned:
Reporter:
Created:
11 Mar 2017 at 16:16 UTC
Updated:
4 Apr 2017 at 09:04 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
PA robot commentedThere are some errors reported by automated review tools, did you already check them? See http://pareview.sh/pareview/httpsgitdrupalorgsandboxesolitos2859375git
We are currently quite busy with all the project applications and we prefer projects with a review bonus. Please help reviewing and put yourself on the high priority list, then we will take a look at your project right away :-)
Also, you should get your friends, colleagues or other community members involved to review this application. Let them go through the review checklist and post a comment that sets this issue to "needs work" (they found some problems with the project) or "reviewed & tested by the community" (they found no major flaws).
I'm a robot and this is an automated message from Project Applications Scraper.
Comment #3
sugandhkhanna2 commentedHi esolitos,
pareview is containing some errors and warning. Please fix them.
pareview: https://pareview.sh/node/1352
Comment #4
esolitosHi @sugandhkhanna2 thanks for the review, I am aware of those and I am not planing to fix them for this reasons:
NorwegianIdItem::isValidNorwegianIDwould beNorwegianIdItem::isValidNorwegianId, I think that having theIDas full capitala is much more readable than the counterpart. If this will turn out to be really a blocker.. I guess i'll change it, but I really believe that the current method signature is more readable.README.mdthe lines that are longer than 80 char are actually links..Comment #5
szeidler commentedI installed the test and made a couple of tests with valid norwegian ids.
Automated Review
Although Pareview reports minor issues, I think it's just fine.
I also would prefer
isValidNorwegianId()overisValidNorwegianID(), because the clean lower camelCase for Id's is used in Drupal 8 core. It also helps for consistency, when using Id in another context, like getIdFromSomewhere(), to clearly separate the word boundaries.But that's just a tiny detail, so shouldn't block the application:
Manual Review
The code looks in general alright for me and makes uses DrupalAPI how it is intended.
Although it seems, that I identified an major issue in the number validation. I see a problem in
When I use for example the number 311208945xx, which is a boy, who was born at 31.12.2008 fails. (You can use 2 random digits at the end, because it doesn't matter for that testcase)
The reason, that it fails, is that the function directly returns the result of the condition for a specific individual number range. As they are overlapping number ranges my case goes into
and return false. Although my test individual number also works for the next
elseifand would return true there.Can you reproduce the error, or was I wrong with my manual testcase?
Comment #6
esolitosThanks for the valuable feedback!
I renamed the method to
isValidNorwegianId()as suggested and moved the custom validation to a Validation plugin so can be also used by other modules.On top of that I fixed the bug reported by
szeidlerand also added a PHPUnit test.Currently pareview.sh reports only details and false-positives.
Project is ready for more review!
Comment #7
szeidler commentedThanks for solving the logical error in the module, it validates correct now. Perfect to have that proven by tests.
From my perspective the module looks ready to go now.
Comment #8
avpadernoThank you for your contribution!
I updated your account so you can opt into security advisory coverage now.
Here are some recommended readings to help with excellent maintainership:
You can find lots more contributors chatting on IRC in #drupal-contribute. So, come hang out and stay involved!
Thank you, also, for your patience with the review process. Anyone is welcome to participate in the review process. Please consider reviewing other projects that are pending review. I encourage you to learn more about that process and join the group of reviewers.
Thanks go the dedicated reviewer(s) as well.
Comment #9
esolitosThank you!
Comment #10
klausiAssigning credits.