Before using this plugin, you must ensure that
phpcs is installed on your
system together with the Drupal coding standards.
To do this, follow the next steps:
composer global require drupal/codersudo ln -s ~/.composer/vendor/bin/phpcs /usr/local/binphpcs --config-set installed_paths ~/.composer/vendor/drupal/coder/coder_sniffer
After you have completed the steps above, no additional configuration is required.
For more information about these procedures please check this drupal article.
Except for the regular inline coding standards issues, this package also add a button to the status bar.
copy drupalcs errors can be used to get the errors to the clipboard so that you can easily report them.
You can then install this package either from within Atom or by running the following command:
$ apm install linter-drupalcs
Note: If you do not already have the
linter package installed it will be installed
for you to provide an interface for this package.
You can configure linter-phpcs from the Atom package manager or by editing ~/.atom/config.cson (choose Open Your Config in Atom menu).
Here's is the example config:
'linter-drupalcs':executablePath: phpcs # phpcs path. run 'which phpcs' to find the pathcodeStandardOrConfigFile: 'Drupal' # Drupal coding standards filewarningSeverity: 0 # phpcs warning-severity (0 to display only errors)ignore: '*.features.field_base.inc,*.features.field_instance.inc,*.features.inc' # ignore filename patterns
Good catch. Let us know what about this package looks wrong to you, and we'll investigate right away.