Skip to content

Commit

Permalink
Don’t check when default-directory is remote
Browse files Browse the repository at this point in the history
See GH-883
  • Loading branch information
swsnr committed Feb 24, 2016
1 parent d4c302c commit aad1de2
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions flycheck.el
Expand Up @@ -2561,6 +2561,11 @@ If CONDITION is non-nil, determine whether syntax may checked
automatically according to
`flycheck-check-syntax-automatically'."
(and (not (or buffer-read-only (flycheck-ephemeral-buffer-p)))
;; Don't even try to check `default-directory' if it's remote, to prevent
;; expensive checks if Flycheck Mode gets enabled in a Tramp-backed
;; buffer. As a consequence, remote files are _never_ checked.
;; See https://github.com/flycheck/flycheck/issues/883 for background
(not (file-remote-p default-directory))
(file-exists-p default-directory)
(or (not condition)
(memq condition flycheck-check-syntax-automatically))))
Expand Down

0 comments on commit aad1de2

Please sign in to comment.