Skip to content

Commit 430b045

Browse files
committed
Added special case for .tpl.php extensions.
1 parent be281df commit 430b045

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

drupal/flymake-phpcs.el

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,8 +49,11 @@
4949
;; version of `flymake-allowed-file-name-masks' and make
5050
;; flymake-phpcs initialize.
5151
(make-local-variable 'flymake-allowed-file-name-masks)
52-
(add-to-list 'flymake-allowed-file-name-masks
53-
`(,(concat "\\." (file-name-extension (or buffer-file-name (buffer-name))) "\\'") flymake-phpcs-init))
52+
(let ((extension (file-name-extension (or buffer-file-name (buffer-name)))))
53+
(when (string-match "\\.tpl\\.php\\'" (or buffer-file-name (buffer-name)))
54+
(setq extension "tpl\\.php"))
55+
(add-to-list 'flymake-allowed-file-name-masks
56+
`(,(concat "\\." extension "\\'") flymake-phpcs-init)))
5457
(flymake-mode 1)))
5558

5659
(add-hook 'drupal-mode-hook #'drupal/flymake-phpcs-enable)

0 commit comments

Comments
 (0)