Join as a member. There's a certificate with your name on it.
Coder checks your Drupal code against coding standards and other best practices. It can also fix coding standard violations for you with the phpcbf command from PHP_CodeSniffer, see the installation instructions and usage examples. Those checks apply to all versions of Drupal, so you can use Coder 8.x-2.x to check Drupal 7 code.
Coder is not a module, it is used as command line tool and in IDEs.
Note that Javascript support has been removed. To check and fix Javascript files please use ESLint and see the Drupal ESLint documentation.
Online version
Usage
$ phpcs --standard=Drupal example.module
FILE: /home/klausi/workspace/coder/example.module
--------------------------------------------------------------------------------
FOUND 5 ERRORS AFFECTING 5 LINES
--------------------------------------------------------------------------------
1 | ERROR | [ ] Missing file doc comment
3 | ERROR | [ ] Missing function doc comment
4 | ERROR | [ ] Opening brace should be on the same line as the declaration
5 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 1
6 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 3
--------------------------------------------------------------------------------
PHPCBF CAN FIX THE 2 MARKED SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------------
Drupal 8 module upgrading
See https://drupal.org/project/drupalmoduleupgrader
Old Coder module for D7 and D6
All information is now on a documentation page.
Sponsors
The Coder module was originally developed by douggreen, partially supported by CivicActions.
The Coder Review module was sponsored by Annertech for several years of work. Development of the Drupal 7.x upgrade routines was partially sponsored by Clarity Digital Group (owners of NowPublic.com and Examiner.com).
The Coder Upgrade module is sponsored by Boombatower Development.
Project Information
- Maintenance status: Actively maintained
- Development status: Under active development
- Module categories: Developer, Drush, Utility
- Reported installs: 3,053 sites currently report using this module. View usage statistics.
- Downloads: 834,681
- Last modified: 17 September 2016
Stable releases for this project are covered by the security advisory policy.
Look for the shield icon below.
Downloads
| Version | Download | Date |
|---|---|---|
|
8.x-2.12 |
tar.gz (96.15 KB) | zip (188.41 KB) | 2017-Mar-18 |
|
7.x-2.6 |
tar.gz (308.8 KB) | zip (435.57 KB) | 2016-Jul-12 |
|
7.x-1.3 |
tar.gz (239.08 KB) | zip (282.45 KB) | 2016-Jul-12 |
