kerasai/robo-phpcs

There is no license information available for the latest version (1.0.4) of this package.

PHPCS task for Robo PHP task runner.

1.0.4 2022-10-26 16:17 UTC

This package is auto-updated.

Last update: 2024-04-26 19:37:07 UTC


README

CircleCI

Robo PHPCS

Installation

composer require --dev kerasai/robo-phpcs

You'll also want standards to apply. For the example configruation below:

composer require --dev drupal/coder

Usage

vendor/bin/robo test:phpcs

robo.yml

phpcs:
  # Defaults to 'phpcs'.
  path: vendor/bin/phpcs
  files:
    src:
      standard: vendor/drupal/coder/coder_sniffer/Drupal
    tests:
      standard: vendor/drupal/coder/coder_sniffer/Drupal
    modules:
      path: web/modules/custom
      standard: vendor/drupal/coder/coder_sniffer/Drupal
      extensions: 'php,module,inc,install,test,profile,theme,css,info,txt,md'
      ignore: 'node_modules,bower_components,vendor'
    themes:
      path: web/themes/custom
      standard: vendor/drupal/coder/coder_sniffer/Drupal
      extensions: 'php,module,inc,install,test,profile,theme,css,info,txt,md'
      ignore: 'node_modules,bower_components,vendor'
    modules_practice:
      path: web/modules/custom
      standard: vendor/drupal/coder/coder_sniffer/DrupalPractice
      extensions: 'php,module,inc,install,test,profile,theme,css,info,txt,md'
      ignore: 'node_modules,bower_components,vendor'
    themes_practice:
      path: web/themes/custom
      standard: vendor/drupal/coder/coder_sniffer/DrupalPractice
      extensions: 'php,module,inc,install,test,profile,theme,css,info,txt,md'
      ignore: 'node_modules,bower_components,vendor'

Robofile.php:

<?php

class RoboFile {

  use \Kerasai\Robo\Phpcs\loadTasks;

  /**
   * PHPCS code style checks
   */
  public function testPhpcs() {
    $this->taskPhpcs()->run();
  }

}