emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[nongnu] elpa/drupal-mode 42fc725add 092/308: Hardened match for code sn


From: ELPA Syncer
Subject: [nongnu] elpa/drupal-mode 42fc725add 092/308: Hardened match for code sniffer standard.
Date: Tue, 25 Jan 2022 10:59:33 -0500 (EST)

branch: elpa/drupal-mode
commit 42fc725add2167afa755054f7dc38b2e1408cc98
Author: Arne Jørgensen <arne@arnested.dk>
Commit: Arne Jørgensen <arne@arnested.dk>

    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)



reply via email to

[Prev in Thread] Current Thread [Next in Thread]