3737(defun flycheck-fsharp--can-make-request-p ()
3838 (fsharp-ac-can-make-request t ))
3939
40+ (defun flycheck-verify-fsautocomlete (_checker )
41+ " Verify the F# syntax checker."
42+ (let* ((host (fsharp-ac--hostname (buffer-file-name )))
43+ (process (fsharp-ac-completion-process host))
44+ (status (when process (process-status process)))
45+ (command (when process (combine-and-quote-strings (process-command process)))))
46+ (list
47+ (flycheck-verification-result-new
48+ :label " FSharp.AutoComplete process"
49+ :message (cond
50+ ((eq status 'run ) command)
51+ (status (format " Invalid process status: %s (%s ) " command status))
52+ (" not running" ))
53+ :face (if (eq status 'run ) 'success '(bold error ))))))
54+
4055(defun flycheck-fsharp-fsautocomplete-lint-start (checker callback )
4156 " Start a F# syntax check with CHECKER.
4257CALLBACK is the status callback passed by Flycheck."
@@ -52,6 +67,7 @@ CALLBACK is the status callback passed by Flycheck."
5267See URL `https://github.com/fsharp/FsAutoComplete' ."
5368 :start #'flycheck-fsharp-fsautocomplete-lint-start
5469 :predicate #'flycheck-fsharp--can-make-request-p
70+ :verify #'flycheck-verify-fsautocomlete
5571 :modes '(fsharp-mode))
5672
5773(defvar flycheck-fsharp--error-callback-info nil )
@@ -68,6 +84,7 @@ See URL `https://github.com/fsharp/FsAutoComplete'."
6884 :start #'flycheck-fsharp-fsautocomplete-start
6985 :modes '(fsharp-mode)
7086 :predicate #'flycheck-fsharp--can-make-request-p
87+ :verify #'flycheck-verify-fsautocomlete
7188 :next-checkers '((info . fsharp-fsautocomplete-lint)))
7289
7390(defun flycheck-fsharp-handle-lint (data )
0 commit comments