Skip to content

Instantly share code, notes, and snippets.

@he-la
Created January 13, 2020 18:29
Show Gist options
  • Save he-la/471aad8ae8d6cb5b2ca3e4f7f9444a73 to your computer and use it in GitHub Desktop.
Save he-la/471aad8ae8d6cb5b2ca3e4f7f9444a73 to your computer and use it in GitHub Desktop.
Emacs flycheck checker for futhark
(flycheck-define-checker futhark
"A futhark syntax checker using `futhark check`."
:command ("futhark" "check" source-inplace)
:error-patterns
(
;; TODO: Use column range
(error line-start "Error at " (file-name) ":" line ":" column "-" (1+ digit) ":"
(0+ (not graphic))
(message (1+ anything) "If you find this error message confusing")) ;; TODO: exclude delimiter from output (no lookahead support)
(warning line-start "Warning at " (file-name) ":" line ":" column "-" (1+ digit) ":"
(0+ (not graphic))
(0+ (syntax whitespace)) (message))
)
:modes futhark-mode)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment