branch: elpa/drupal-mode
commit 42fc725add2167afa755054f7dc38b2e1408cc98
Author: Arne Jørgensen <[email protected]>
Commit: Arne Jørgensen <[email protected]>
Hardened match for code sniffer standard.
---
drupal/flymake-phpcs.el | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/drupal/flymake-phpcs.el b/drupal/flymake-phpcs.el
index ead33ab7db..162a3e4fdd 100644
--- a/drupal/flymake-phpcs.el
+++ b/drupal/flymake-phpcs.el
@@ -32,11 +32,11 @@
(let ((standards (with-output-to-string
(with-current-buffer standard-output
(call-process (executable-find flymake-phpcs-command)
nil (list t nil) nil "-i")))))
- (string-match
- "\\(Drupal[^,
+ (when (string-match
+ "\\(Drupal[^,
]*\\)"
- standards)
- (match-string-no-properties 1 standards)))
+ standards)
+ (match-string-no-properties 1 standards))))
"Name of Drupal coding standard rules for PHP CodeSniffer."
:link '(url-link :tag "Drupal Code Sniffer"
"http://drupal.org/project/drupalcs")
:group 'drupal)