|
1 | | -;;; phpstan-flycheck.el --- Flycheck integration for PHPStan -*- lexical-binding: t; -*- |
| 1 | +;;; flycheck-phpstan.el --- Flycheck integration for PHPStan -*- lexical-binding: t; -*- |
2 | 2 |
|
3 | 3 | ;; Copyright (C) 2018 Friends of Emacs-PHP development |
4 | 4 |
|
|
7 | 7 | ;; Version: 0.1.0 |
8 | 8 | ;; Keywords: convenience, php |
9 | 9 | ;; Homepage: https://github.com/emacs-php/phpstan.el |
10 | | -;; Package-Requires: ((emacs "24") (flycheck "26")) |
| 10 | +;; Package-Requires: ((emacs "24") (flycheck "26") (phpstan "0.1.0")) |
11 | 11 |
|
12 | 12 | ;; This program is free software; you can redistribute it and/or modify |
13 | 13 | ;; it under the terms of the GNU General Public License as published by |
|
33 | 33 | ;; Usually it is defined dynamically by flycheck |
34 | 34 | (defvar flycheck-phpstan-executable) |
35 | 35 |
|
36 | | -(defun phpstan-flycheck--enabled-and-set-variable () |
| 36 | +(defun flycheck-phpstan--enabled-and-set-variable () |
37 | 37 | "Return path to phpstan configure file, and set buffer execute in side effect." |
38 | 38 | (let ((enabled (not (null (or phpstan-working-dir (phpstan-get-config-file)))))) |
39 | 39 | (prog1 enabled |
|
57 | 57 | (flycheck-save-buffer-to-temp #'flycheck-temp-file-inplace) |
58 | 58 | (flycheck-save-buffer-to-temp #'flycheck-temp-file-system)))) |
59 | 59 | :working-directory (lambda (_) (phpstan-get-working-dir)) |
60 | | - :enabled (lambda () (phpstan-flycheck--enabled-and-set-variable)) |
| 60 | + :enabled (lambda () (flycheck-phpstan--enabled-and-set-variable)) |
61 | 61 | :error-patterns |
62 | 62 | ((error line-start (1+ (not (any ":"))) ":" line ":" (message) line-end)) |
63 | 63 | :modes (php-mode) |
64 | 64 | :next-checkers (php)) |
65 | 65 |
|
66 | | -(provide 'phpstan-flycheck) |
67 | | -;;; phpstan-flycheck.el ends here |
| 66 | +(provide 'flycheck-phpstan) |
| 67 | +;;; flycheck-phpstan.el ends here |
0 commit comments