Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Begin gentle refactor #221

Merged
merged 11 commits into from
Nov 23, 2019
34 changes: 17 additions & 17 deletions flycheck-fsharp.el
Original file line number Diff line number Diff line change
Expand Up @@ -40,30 +40,30 @@
(defun flycheck-verify-fsautocomlete (_checker)
"Verify the F# syntax checker."
(let* ((host (fsharp-ac--hostname (buffer-file-name)))
(process (fsharp-ac-completion-process host))
(status (when process (process-status process)))
(project-file (when (eq status 'run) (fsharp-ac--in-project-p (buffer-file-name))))
(projects (when (eq status 'run) (hash-table-keys fsharp-ac--project-data)))
(command (when process (combine-and-quote-strings (process-command process)))))
(process (fsharp-ac-completion-process host))
(status (when process (process-status process)))
(project-file (when (eq status 'run) (fsharp-ac--in-project-p (buffer-file-name))))
(projects (when (eq status 'run) (hash-table-keys fsharp-ac--project-data)))
(command (when process (combine-and-quote-strings (process-command process)))))
(cons
(flycheck-verification-result-new
:label "FSharp.AutoComplete process"
:message (cond
((eq status 'run) command)
(status (format "Invalid process status: %s (%s)" command status))
("not running"))
((eq status 'run) command)
(status (format "Invalid process status: %s (%s)" command status))
("not running"))
:face (if (eq status 'run) 'success '(bold error)))
(when (eq status 'run)
(list (flycheck-verification-result-new
:label "F# Project"
:message (or project-file "None")
:face (if project-file 'success '(bold warning)))
(flycheck-verification-result-new
:label "Loaded Projects"
:message (if projects
(mapconcat #'identity projects ", ")
"No projects loaded")
:face (if projects 'success '(bold warning))))))))
:label "F# Project"
:message (or project-file "None")
:face (if project-file 'success '(bold warning)))
(flycheck-verification-result-new
:label "Loaded Projects"
:message (if projects
(mapconcat #'identity projects ", ")
"No projects loaded")
:face (if projects 'success '(bold warning))))))))

(defun flycheck-fsharp-fsautocomplete-lint-start (checker callback)
"Start a F# syntax check with CHECKER.
Expand Down
Loading