File tree Expand file tree Collapse file tree 2 files changed +31
-0
lines changed
Expand file tree Collapse file tree 2 files changed +31
-0
lines changed Original file line number Diff line number Diff line change @@ -331,6 +331,7 @@ mode-hook, i.e.
331331(eval-after-load 'etags '(require 'drupal/etags ))
332332(eval-after-load 'gtags '(require 'drupal/gtags ))
333333(eval-after-load 'ispell '(require 'drupal/ispell ))
334+ (eval-after-load 'flymake-phpcs '(require 'drupal/flymake-phpcs ))
334335
335336
336337
Original file line number Diff line number Diff line change 1+ ; ;; drupal/flymake-phpcs.el --- Drupal-mode support for flymake-phpcs
2+
3+ ; ;; Commentary:
4+
5+ ; ; Enable drupal-mode support for flymake-phpcs.
6+
7+ ; ;; Code:
8+
9+ (defun drupal/flymake-phpcs-enable ()
10+ " Enable drupal-mode support for flymake-phpcs."
11+ (when (and (executable-find flymake-phpcs-command)
12+ (ignore-errors
13+ (string-match
14+ " Drupal"
15+ (with-output-to-string
16+ (with-current-buffer standard-output
17+ (call-process (executable-find flymake-phpcs-command) nil (list t nil ) nil " -i" ))))))
18+ (set (make-local-variable 'flymake-phpcs-standard ) " Drupal" )
19+ ; ; We have probably set `flymake-phpcs-standard' after a syntax
20+ ; ; check was initiated - so kill it and start syntax check again.
21+ (flymake-stop-all-syntax-checks )
22+ (flymake-start-syntax-check )))
23+
24+ (add-hook 'drupal-mode-hook 'drupal/flymake-phpcs-enable )
25+
26+
27+
28+ (provide 'drupal/flymake-phpcs )
29+
30+ ; ;; drupal/flymake-phpcs.el ends here
You can’t perform that action at this time.
0 commit comments