Skip to content

Commit 0825ac8

Browse files
committed
Use config-file instead of configure-file
1 parent bc56031 commit 0825ac8

File tree

2 files changed

+12
-12
lines changed

2 files changed

+12
-12
lines changed

phpstan.el

+11-11
Original file line numberDiff line numberDiff line change
@@ -36,9 +36,9 @@
3636

3737
;;;###autoload
3838
(progn
39-
(defvar phpstan-configure-file nil)
40-
(make-variable-buffer-local 'phpstan-configure-file)
41-
(put 'phpstan-configure-file 'safe-local-variable
39+
(defvar phpstan-config-file nil)
40+
(make-variable-buffer-local 'phpstan-config-file)
41+
(put 'phpstan-config-file 'safe-local-variable
4242
#'(lambda (v) (if (consp v)
4343
(and (eq 'root (car v)) (stringp (cdr v)))
4444
(null v) (stringp v)))))
@@ -63,13 +63,13 @@
6363
(null v) (stringp v)))))
6464

6565
;; Functions:
66-
(defun phpstan-get-configure-file ()
66+
(defun phpstan-get-config-file ()
6767
"Return path to phpstan configure file or `NIL'."
68-
(if phpstan-configure-file
69-
(if (and (consp phpstan-configure-file)
70-
(eq 'root (car phpstan-configure-file)))
71-
(expand-file-name (cdr phpstan-configure-file) (php-project-get-root-dir))
72-
phpstan-configure-file)
68+
(if phpstan-config-file
69+
(if (and (consp phpstan-config-file)
70+
(eq 'root (car phpstan-config-file)))
71+
(expand-file-name (cdr phpstan-config-file) (php-project-get-root-dir))
72+
phpstan-config-file)
7373
(cl-loop for name in '("phpstan.neon" "phpstan.neon.dist")
7474
for file = nil
7575
for dir = (locate-dominating-file default-directory name)
@@ -102,11 +102,11 @@
102102
"PHP static analyzer based on PHPStan."
103103
:command ("php" (eval (phpstan-get-executable))
104104
"analyze" "--errorFormat=raw" "--no-progress" "--no-interaction"
105-
"-c" (eval (phpstan-get-configure-file))
105+
"-c" (eval (phpstan-get-config-file))
106106
"-l" (eval (phpstan-get-level))
107107
source)
108108
:working-directory (lambda (_) (php-project-get-root-dir))
109-
:enabled (lambda () (phpstan-get-configure-file))
109+
:enabled (lambda () (phpstan-get-config-file))
110110
:error-patterns
111111
((error line-start (1+ (not (any ":"))) ":" line ":" (message) line-end))
112112
:modes (php-mode)

test.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,6 @@
88
echo FOO;
99

1010
// Local Variables:
11-
// phpstan-configure-file: (root . "tests/phpstan.neon")
11+
// phpstan-config-file: (root . "tests/phpstan.neon")
1212
// phpstan-level: 7
1313
// End:

0 commit comments

Comments
 (0)