Skip to content

Instantly share code, notes, and snippets.

@jordonbiondo
Created April 14, 2014 15:06
Show Gist options
  • Select an option

  • Save jordonbiondo/10656469 to your computer and use it in GitHub Desktop.

Select an option

Save jordonbiondo/10656469 to your computer and use it in GitHub Desktop.
working windows omnisharp syntax checker for flycheck
(flycheck-define-checker omnisharp
"Flycheck checker for omnisharp"
:command ("curl"
"--silent" "-H"
"Content-type: application/json"
"--data-binary"
(eval (concat "@" (omnisharp--write-json-params-to-tmp-file
omnisharp--windows-curl-tmp-file-path
(json-encode (omnisharp--get-common-params))))) ;; do the work here, and get the path
"http://localhost:2000/syntaxerrors")
:error-parser omnisharp--flycheck-error-parser-raw-json
:modes csharp-mode)
(defun omnisharp--write-json-params-to-tmp-file
(target-path stuff-to-write-to-file)
"Deletes the file when done."
(with-temp-file target-path
(insert stuff-to-write-to-file)
target-path)) ;; return the target path
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment