Commit 69b071b6 authored by Eirik Morland's avatar Eirik Morland Committed by Klaus Purer
Browse files

fix(phpcs config): Remove file extensions in rulesets because users cannot...

fix(phpcs config): Remove file extensions in rulesets because users cannot overrride them (#3074176 by eiriksm)
parent 7bc033fa
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -64,15 +64,15 @@ The same can be done for a Composer global installation.

Check Drupal coding standards

    phpcs --standard=Drupal /file/to/drupal/example_module
    phpcs --standard=Drupal --extensions=php,module,inc,install,test,profile,theme,css,info,txt,md /file/to/drupal/example_module

Check Drupal best practices

    phpcs --standard=DrupalPractice /file/to/drupal/example_module
    phpcs --standard=DrupalPractice --extensions=php,module,inc,install,test,profile,theme,css,info,txt,md /file/to/drupal/example_module

Automatically fix coding standards

    phpcbf --standard=Drupal /file/to/drupal/example_module
    phpcbf --standard=Drupal --extensions=php,module,inc,install,test,profile,theme,css,info,txt,md /file/to/drupal/example_module


## Store settings in a phpcs.xml.dist file
+0 −2
Original line number Diff line number Diff line
@@ -5,8 +5,6 @@
 <!-- All Drupal code files must be UTF-8 encoded and we treat them as such. -->
 <arg name="encoding" value="utf-8"/>

 <arg name="extensions" value="php,module,inc,install,test,profile,theme,css,info,txt,md,yml"/>

 <autoload>autoload.php</autoload>

 <rule ref="Internal.NoCodeFound">
+0 −2
Original line number Diff line number Diff line
@@ -5,8 +5,6 @@
  <!-- All Drupal code files must be UTF-8 encoded and we treat them as such. -->
  <arg name="encoding" value="utf-8"/>

  <arg name="extensions" value="php,module,inc,install,test,profile,theme,yml"/>

  <autoload>../Drupal/autoload.php</autoload>

  <rule ref="Internal.NoCodeFound">