Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Problem/Motivation
Using IDE plugins like https://atom.io/packages/linter-phpcs allow you to lint your code while you are editing the file. However, since plugins like these can only use a single coding standard, you can't use Drupal
and DrupalPractice
at the same time.
Proposed resolution
Create a single standard that includes both Drupal
and DrupalPractice
Comments
Comment #1
davidwbarratt CreditAttribution: davidwbarratt as a volunteer and at Golf Channel commentedComment #2
davidwbarratt CreditAttribution: davidwbarratt as a volunteer and at Golf Channel commentedComment #3
klausiYou can do that now by creating a custom phpcs.xml file in your project. See https://github.com/squizlabs/PHP_CodeSniffer/wiki/Advanced-Usage#using-a...
Just specify both standards in your phpcs.xml file and both will be checked when you run phpcs/phpcbf.