Open sonnykt opened 5 years ago
Also, does composer.json
need updating?
I'm also encountering this problem. I noticed custom code I am reviewing is passing tests, even though it violates Drupal coding standards. Digging into why, I found this phpcs.xml
is excluding everything.
Could this phpcs.xml
could be brought up-to-date with a more flexible, and inclusive structure. A default could be to scan everything in
<!-- Include these files -->
<file>docroot/sites/default</file>
<file>docroot/modules/custom</file>
<file>docroot/themes/custom</file>
<file>tests</file>
Rather than excluding lots and lots of things, a smaller inclusions list could help project teams who use SDP. It would work better with IDEs, and either compliment, or negate the need for, a PHPCS_TARGETS
env var.
Also, if we renamed it to phpcs.xml.dist
we could allow local overrides for individuals. Similar to how phpunit.xml.dist
works.
Currently
ahoy lint
and PHPCS do not check any code indocroot/modules/custom
due to the exclusion in phpcs.xml. We need to remove this exclusion so that CI can check for coding standard in custom modules.On-behalf-of: @salsadigitalauorg sonny@salsadigital.com.au