NCIOCPL / cgov-digital-platform

The Cancer.gov Digital Communications Platform
GNU General Public License v2.0
11 stars 33 forks source link

PHPCS not scanning PHP files with other extensions #4143

Open jfrank-nih opened 10 months ago

jfrank-nih commented 10 months ago

Issue description

PHPCS is currently only scanning a subset of PHP files, with the .php extension. Other files in Drupal also have PHP and should be scanned.

Issue solution

This line from the stock phpcs.xml file should be added to ours:

<!-- Set extensions to scan (taken from Coder 8.3.6). -->
  <!-- @see https://git.drupalcode.org/project/coder/blob/8.3.6/coder_sniffer/Drupal/ruleset.xml#L8 -->
  <arg name="extensions" value="php,module,inc,install,test,profile,theme,css,info,txt,md,yml"/>

That will make .module and .install files get picked up, among other things. File types to be tweaked as needed.

Doing this will also involve having to fix all the PHPCS errors in those files.

See also

2920

andyvanavery31 commented 4 months ago

Will need to be broken up into individual tickets related to fixing all the PHPCS errors across the different files.