I am beginning some development in pollfield and took a first look at the code using the coder module. I notice that there are some trivial things that still need to be done to make the pollfield module conform to the Drupal 6 code standards. Would the primary developers be open to a patch that addresses these issues (mostly spaces and indentation)? This is such a great module and I'd just like to clean up the back end a bit.
| Comment | File | Size | Author |
|---|---|---|---|
| #25 | 620604-views-coder-review-full.patch | 122.84 KB | simon georges |
| #25 | 620604-views-second-coder-review.tar_.gz | 12.46 KB | simon georges |
| #23 | 620604-views-coder-review.patch | 13.24 KB | simon georges |
| #23 | 620604-views-coder-review.tar_.gz | 1.96 KB | simon georges |
| #16 | pollfield.module_tough_love.patch | 40.18 KB | bryan kennedy |
Comments
Comment #1
vm commentedThere should be no reason those patches don't get in to help this module conform and pass coder.module recommendations.
Comment #2
mario_prkos commented@Bryan
This is good idea! I planed to do this but I had been busy with fixes and new features. I will be glad to see this done. I recommended that you try with dev version. I also planning next big step in developing this module so if you have any developing planing or ideas please share with us.
Road map is something like this:
Comment #3
bryan kennedy commentedOK, I am working on the dev branch. However, as far as I could tell it is identical to the latest beta version except for the .info file. Let me know if there is an even newer version of the dev branch. I will submit a patch for the code standard changes later today.
Comment #4
mario_prkos commentedGreat, looking forward to see it!
At the end of the week I am releasing recommended version from dev branch so they are basically the same in the beginning of the week.
Comment #5
bryan kennedy commentedHere are the patches to bring the pollfield into the Drupal code standards. It's a fairly massive patch because of the changes needed to address indentation and whitespace issues. I made all the recommended coder and coder tough love changes, mostly by hand. So hopefully there aren't any bugs as a result of script based changes. Here's an overview of what I changed:
$var='hello'is now$var = 'hello')I tried to avoid any logic changes that could affect the operation of the module so that this patch would be simpler to trouble shoot if any bugs arise. It tests out OK on my local install of D6. I can add the pollfield type modify its features in various ways and vote on polls alright. Let me know if you need any more clarification on the changes I've added into the patch.
Comment #6
vm commentedComment #7
bryan kennedy commentedWoops, I had something go wrong when I created the pollfield .install.patch file. That one is not correct. Please refer to this patch for the install profile.
Comment #8
mario_prkos commented@Bryan
Thanks! You did it a good job. I will posted this in dev version soon as possible.
Comment #9
bryan kennedy commentedCool, let me know if there is anything I can do to help.
Comment #10
mario_prkos commentedLook at http://drupal.org/node/589210 (my last post) if you are willing to help testing live pollfield. Especially for user anonymous voting policy. I really want this stuff working good and I want to clean as many issues as possible before proceed with next step.
Comment #11
bryan kennedy commented@mario_prkos - Looks like you implemented some of the patch changes into your new version, but not all of them. Thanks for that.
What would be the best way to proceed from here to get the module into compliance with the code guidelines? Should I roll a new patch against the 6.x-1.10-beta1 version?
Comment #12
vm commentedlikely against 6.x-dev unless HEAD is still 6.x and hasn't shifted to 7.x
Comment #13
bryan kennedy commentedYes, I will do it against 6.x-dev for sure...I was just trying to specify the new version of 6.x-dev. It seems like mario is keeping dev and the latest version pretty much exactly the same for now.
Comment #14
mario_prkos commented@bryan, it will be great.You can use 1.10-beta1. I rolled patches but you right some of them didn't pass. I used dev version. Now dev version and recommended are the same. I will than sync them after patch is rolled on 1.10-beta1.
Thanks for help, Mario!
Comment #15
bryan kennedy commentedHere is a patch against dev/1.10-beta1
This resolves all coder issues.
I am going to open up a couple of other specific issues for stuff that I noticed in this process, but that I didn't want to muddy up this patch. This should mostly be changes:
-indentation (spaces not tabs)
-spaces after curly braces
-spaces after commas
Comment #16
bryan kennedy commentedHere's one more patch file for you to consider. This includes all of the changes I put into the above patch, but also all the recommended changes from coder_tough_love. I broke this one out separate just beacause I thought you might be reluctant to put all of these changes in at once. Anyways I'll let you take your pick.
Comment #17
mario_prkos commentedBoth of them look good to me so I just peek first one. Now code look much better, cool!
Comment #18
dddave commentedAre those changes included? If so this issue can be closed.
Comment #19
mario_prkos commentedYes there are.
Comment #20
dddave commentedWell, then lets close this. Included since november, nobody complained. Great.
Comment #21
steven jones commentedThis needs addressing again.
Comment #22
bryan kennedy commentedLet me know if you need help going through the module. I know this sort of code cleanup can be a tedious process. Maybe we can divide it up in halves? Who knows, maybe that's more work than it's worth. Either way, I can help if you'd like.
Comment #23
simon georges commentedHi.
I've started the work (applying coder review to all views-related files). I've attached the patch and the files as well, just in case.
I plan to perform the same on the module, maybe tomorrow, unless somebody's already doing it.
Regards,
Comment #24
dddave commentedstatus...
Setting the priority back to normal. We have now four states and I don't think this is lowest priority.
Comment #25
simon georges commentedHi,
I've completed the "coder fix". For pollfield.module, there was too much to fix, so I used the coder_format script.
While I was at it, I've made the css file uniform (space after ":", 2 spaces identation).
The attached patch includes the full review (the one doing yesterday, same as in #23, as well as today'one). I've attached the .css and the .module as well.
Regards,
Comment #26
bryan kennedy commentedThanks for all the work on this. I went through the coder module and made all the changes directly. It was just easier than reviewing these patches, because of the size of the changes. The entire module in the latest dev branch should be in line with the Drupal coding standards. Going forward we will keep it that way.