Any script that tries to convert bad code-style modules to good one (as code_style.pl suggests?)
Is there any available? Code Review module does analyze adherence to coding standards, could possibly be expanded by a module that allows rewriting the code as suggested on screen. For now, you have to do it manually, and most times it really is a good idea to thoroughly check the improvement suggestions manually - but maybe such a module could implement an easy UI to select which types of suggestions should be applied automagically (javascript: checkbox for every single change suggestion + checkboxes at the top 'select all whitespace at EOL to be fixed', 'fix standard Implementation of hook_foo(). comment' etc)..
[BTW, KDE's Kate editor is brilliant for editing all drupal code, it has good syntax highlighting, autocompletion, regex search and replace, opens multiple files, symbol viewer allows navigation by function/class definition, can open/save files directly via ftp/sftp/ssh, clearly marks tabs and white space at end of line etc. Also, for comparing directory hierarchies (f.e. updated with installed module checkout), kdiff3 is an indispensable tool for maintaining oversight over diverging code branches, or simply reviewing changes to development version of modules before you put them on your site. Both tools available for *n*x and windows.] regards, marcel. -- "Obstacles are those frightful things you see when you take your eyes off your goal." -- Henry Ford (1863-1947) Change the world! Vote: http://hfopi.org/vote-future
Yes, there is. Look into the "scripts" directory of Coder module (http://drupal.org/project/coder), which contains the coder_format script. It is capable of reformatting single files, but can also run recursively on an entire directory (automatically doing backups of original files). The implemented logic works for 99% of all cases. You should always review the code after reformatting to ensure that nothing went wrong. The long-term goal of coder_format is to reformat all of Drupal core in one pass without errors. To fix countless of coding-style issues in Drupal core after each code freeze. I suggest to always use the latest code from Coder HEAD in CVS. Please note, however, that I didn't find the time to work proper formatting of D7's chained DBTNG methods yet (though I guess that isn't an issue for you). sun ________________________________ From: development-bounces@drupal.org [mailto:development-bounces@drupal.org] On Behalf Of Doq Doques Sent: Thursday, August 13, 2009 11:27 AM To: development@drupal.org Subject: [development] Any script that tries to convert bad code-stylemodules to good one (as code_style.pl suggests?) Is there any available? Sincerely, Doq Doques
Thanks! Is smth for CSS and javascripts available? On Thu, Aug 13, 2009 at 12:26 PM, Doq Doques <doques@gmail.com> wrote:
Is there any available?
Sincerely, Doq Doques
participants (3)
-
Daniel F. Kudwien -
Doq Doques -
Marcel Partap