arnested / drupal-mode

Advanced Emacs minor mode for Drupal development
https://melpa.org/#/drupal-mode
GNU General Public License v3.0
32 stars 14 forks source link

Hardcode the Drupal coding standard name #71

Closed kostajh closed 8 years ago

kostajh commented 8 years ago

If I do this, Drupal mode, flycheck and phpcs work happily together. If I don't, I get errors that Drupal and DrupalPractice coding standard not found, and if I manually remove the DrupalPractice code sniff style, I get Drupal and PSR1 coding standard not found.

arnested commented 8 years ago

What is the output of running phpcs -i in a shell?

kostajh commented 8 years ago

The installed coding standards are MySource, PSR2, Zend, Squiz, PHPCS, PEAR, Drupal and PSR1

Arne Jørgensen writes:

What is the output of running phpcs -i in a shell?


You are receiving this because you authored the thread. Reply to this email directly or view it on GitHub: https://github.com/arnested/drupal-mode/pull/71#issuecomment-211931130

@kostajh | kosta@kostaharlan.net

kostajh commented 8 years ago

I'm on phpcs 2.6.0 btw

arnested commented 8 years ago

I'm on the same version and get The installed coding standards are MySource, PEAR, PHPCS, PSR1, PSR2, Squiz, Zend, ArneDrupal, Drupal, DrupalPractice, DrupalSecure, Symfony2 and Security.

That's not very different from you.

Merging your pull request could lead to wrong standards being (trying to be) used. But apparently I need to adjust the regex (maybe phpcs changed its output).

I'll look into this later today (gotta do some work now).

arnested commented 8 years ago

We couldn't catch the Drupal standard if it was the next to last standard as in:

The installed coding standards are MySource, PSR2, Zend, Squiz, PHPCS, PEAR, Drupal and PSR1

Maybe there used to be an Oxford comma in the output of phpcs? Or maybe we have always been failing on this.

Fixed in #72.