this started in #595930: from github to d.o cvs(aka start 6.x-2.0-dev and get access)
quoting sdboyer:
BTW, there's been movement on coding standards since I think we last talked - http://drupal.org/coding-standards and http://drupal.org/node/608152 . Yes, more Crell (and me) :) I see why we were using them - indicating a public method that is really only intended to be called by the backend - but I'd still rather we use something other than underscores. I like your idea:
In this case, like other "underscored methods", I use it for forcing a "good" workflow, letting a fallback; but maybe is a good idea to rename the underscored method to a with a new "identifier"/name instead of _
So, we need to evaluate a good way to follow standards as much as possible and also and mainly letting the code to be as understandable as possible.
| Comment | File | Size | Author |
|---|---|---|---|
| #16 | 0001-Issue-723962-by-tizzo-marvil07-Code-standards-review.patch | 60.53 KB | marvil07 |
| #15 | coding_standards-723962-15.patch | 59.02 KB | marvil07 |
| #15 | interdiff.txt | 10.92 KB | marvil07 |
| #14 | versioncontrol-coding_standards-723962-14.patch | 51.42 KB | tizzo |
| #13 | versioncontrol-coding_standards-723962-13.patch | 43.73 KB | tizzo |
Comments
Comment #1
marvil07 commentedAfter #879858: Unify entity C(R)UD most of underscored methods are changed to
backend<crud_operation>(), so less things to do here.Leaving this open to actually make a review across all the code and another one with coder module.
Comment #2
marvil07 commentedComment #3
sdboyer commentedWe should have an outside party do this (and a security review) prior to stable release, but not just yet.
Comment #4
sdboyer commentedWow, this is the least critical path issue marked git phase 2 that i've untagged today :)
Comment #5
marvil07 commentedlet's do this review before 6.x-2.0
Comment #6
marvil07 commentedNot a blocker, but let's do this before opening a 7.x-2.x (leaving the tag only to remember that)
Comment #7
tizzo commentedTaking this.
Comment #8
tizzo commentedComment #9
marvil07 commentedThe patch is for D7 I think(applies there), let the bot try it.
Comment #10
marvil07 commentedSorry for the noise, I do not know why testbot is not triggering the coder review for versioncontrol branches nor patches. Back to original state.
Comment #11
marvil07 commented#8: versioncontrol-coding_standards-723962-7.patch queued for re-testing.
Comment #12
marvil07 commentedSorry for the noise again. After talking with jthorson, now I have it clear: testbot runs coder review only for branches, not for patches, and that seems to be disabled from time to time, so I guess it's not reliable.
After running it locally I see this patch makes a good progress, but it's halfway there, so moving back to original state.
Comment #13
tizzo commentedThis passes coder review on "normal" and fixes a number of the things in "minor". I think this is ready to be committed as a big improvement though we may want to clear up "minor" violations as well.
Comment #14
tizzo commentedThis patch passes all minor issues as well with the exception of classes being camel case in the case of views handlers. We are consistent with views which is not consistent with Drupal coding standards. I'd prefer to keep it that way.
Comment #15
marvil07 commentedThanks for taking the time to push this :-)
There was a minor bug here,
drupal_substr()exists, butdrupal_strrpos()not.Sadly, that code is not really equivalent to the original one. It is a multi-replace, we can not assume one issue ;-) and we need to link the id and actually show all the message, which is not happening after that hunk.
I wrote a little piece to avoid e
preg_replace()modifier.Also, I added some more minor doc issues for coder to be happier.
I'll add it after bot re-confirms it.
Comment #16
marvil07 commentedAdded to 7.x-1.x and to 6.x-2.x after some minor conflict resolution.
It feels so good to close 2 years old issues, thanks Howard!
The patch applied to D6 FTR.
Comment #17
tizzo commentedGood call on the matching logic. I should have caught that. Thanks for the fix!