Features generate code like:
/*
* Implementation of hook_foo().
*/
where it according to the coding standard (http://drupal.org/node/1354#hookimpl) should be:
/*
* Implements hook_foo().
*/
Although it might not seem very important it makes the coder module complain about the code generated by features.
Attached is a patch (features.export.patch) to make features generate code according to coding standard regarding this.
Attached is also a patch (features.patch) to make features itself adhere to coding standard regarding this.
| Comment | File | Size | Author |
|---|---|---|---|
| #11 | features-coding-standards-1231118-11.patch | 573 bytes | mariacha1 |
| #7 | features-coding-standards-1231118-7.patch | 994 bytes | nielsonm |
| #4 | features-coding-standards-1231118-04.patch | 720 bytes | jhedstrom |
| #1 | features-1231118-1.patch | 20.47 KB | tim.plunkett |
| features.patch | 22.41 KB | arnested |
Comments
Comment #1
tim.plunkettRolled a proper -p1 patch.
Comment #2
dead_armPatch looks fine.
Comment #3
febbraro commentedThanks.
http://drupalcode.org/project/features.git/commit/82ac8d7
Comment #4
jhedstromI found one more issue (regarding usage of include_once), when using Drupal Code Sniffer on a features-generated module. Very simple fix attached.
Comment #5
tim.plunkettFixed in both branches.
http://drupalcode.org/project/features.git/commit/a9f9f92
http://drupalcode.org/project/features.git/commit/83e0a6c
Comment #7
nielsonm commentedI noticed the inline comments for exported user roles and permissions lacked a full stop, so here's a patch.
Comment #8
tim.plunkettComment #9
mpotter commentedCommitted http://drupalcode.org/project/features.git/commit/c04fce6.
Comment #10
hefox commentedComment #11
mariacha1 commentedOne more patch that fixes a double-spacing issue at the bottom of the hook_menu_default_menu_links() implementation. If I have any translatables, I get the error:
Functions must not contain multiple empty lines in a row; found 2 empty linesAttached is a patch.
Comment #12
hefox commentedProbably still an issue?
Comment #14
mpotter commentedComment #16
bedlam+1 for the patch in #11:
features_translatables_export()makes sense because:Comment #17
mpotter commentedCommitted #11 to 38b22da.
Comment #20
arnested commented