Skip to content

Commit e401a37

Browse files
xendkdoublep
authored andcommitted
Always fake that the temp file is the main file
1 parent 1bdcd3a commit e401a37

1 file changed

Lines changed: 3 additions & 10 deletions

File tree

flycheck-eldev.el

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -257,23 +257,16 @@ If FROM is nil, search from `default-directory'."
257257
;; `eldev-project-main-file' is specified, this does nothing.
258258
"--setup-first"
259259
,(flycheck-sexp-to-string
260-
`(advice-add #'eldev--package-dir-info :around
260+
`(advice-add #'eldev-package-descriptor :around
261261
(lambda (original)
262262
(eldev-advised
263263
(#'insert-file-contents
264264
:around (lambda (original filename &rest arguments)
265265
(if (file-equal-p filename ,real-filename)
266-
(when ,flycheck-eldev-outside-temp-files
267-
;; Load the temp file instead.
268-
(apply original ,filename arguments))
266+
;; Load the temp file instead.
267+
(apply original ,filename arguments)
269268
(apply original filename arguments))))
270269
(funcall original)))))
271-
;; When checking project's main file, use the temporary as the main file
272-
;; instead.
273-
"--setup"
274-
,(flycheck-sexp-to-string
275-
`(when (and eldev-project-main-file (file-equal-p eldev-project-main-file ,real-filename))
276-
(setf eldev-project-main-file ,filename)))
277270
;; Special handling for test files: load extra dependencies as if testing
278271
;; now. Likewise for loading roots.
279272
"--setup"

0 commit comments

Comments
 (0)