Code style
Pasqualle - September 6, 2008 - 12:43
| Project: | AJAX Picture Preview |
| Version: | 6.x-1.x-dev |
| Component: | Code |
| Category: | task |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | postponed |
Jump to:
Description
Please use the Coder module and fix the coding style.

#1
I ran a code review on 6.x-1.x-dev with the settings set to 'minor' and did not turn up anything. The only thing I changed prior to this was moving the .js to js in my menu item path.
Please let me know what you're referring to.
#2
there are some trailing spaces, many tabs, and indentation is larger than 2 spaces..
http://drupal.org/node/318 -> Indenting
nobody will force you to fix this issue, but it is frustrating to create a patch for the ajaxfileuploads.js file, because many of us want to fix the style before fixing the problem, and the patch will be unreadable.. I just stay away from modules which does not follow the standard, or ask the maintainer to fix it..
#3
curious why coder didn't pick up tabs and trailing space if it was supposed to. maybe because the only tabs i found were in an $output variable, and not the code itself.
the -dev build should be good to go. i'm going to hold off on a new release to see if any other issues come in, but that one should be the best to use at this time.
thanks for pointing out the specifics.
#4
#5
the ajaxfileupload.js file still contains code style errors..
#6
that's the jquery plugin i didn't write. logan, the author, gave me permission to include it with this module. interesting issue though, do you go through and make 3rd party software comply with drupal coding styles, or do you keep them as their own? I mean would you really go through and change tabs to spaces in something like the fckeditor library? .. not really on my priority list, but I agree, the plugin looks a bit messy in an editor.
still wondering why coder isn't complaining to me when i run it against the module like it is for you.
#7
there is a tendency in Drupal development, when you really want to fully use a third party functionality inside Drupal you just completely rewrite the code. take simpletest for an example..
another example of mine is the krumo library used in devel module. that library has html errors, and I just filed a bug report for that library on it's own bug tracker. but I do not expect that it will be fixed..
I reported this issue because I thought the .js file is yours..
the .js files are not checked with coder. I saw the code style errors by opening the file.. could be a good feature request for coder, if the issue does not exists already..