Skip to content

Instantly share code, notes, and snippets.

@queertypes
Created March 18, 2015 23:26
Show Gist options
  • Save queertypes/50d8a85bbc28c6689b78 to your computer and use it in GitHub Desktop.
Save queertypes/50d8a85bbc28c6689b78 to your computer and use it in GitHub Desktop.
F# Flychecker
(flycheck-define-checker fsharp-check
;; Lazy command - run compiler in module mode
:command ("fsc" "--target:module" source)
;; /path/to/X.fs(7,23): error FS0001: This expression was expected to have type\n
;; int -> int option\n
;; but here has type\n
;; int\n
;; \n
;; TODO: better indentation below
:error-patterns
((error line-start (file-name) "(" line "," column "): error "
(message (and (one-or-more not-newline) "\n" (zero-or-more (and (one-or-more not-newline) "\n")) (or "\n" buffer-end))))
(warning line-start (file-name) "(" line "," column "): warning "
(message (and (one-or-more not-newline) "\n" (zero-or-more (and (one-or-more not-newline) "\n")) (or "\n" buffer-end))))
)
:modes fsharp-mode)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment