Skip to content

Instantly share code, notes, and snippets.

@laclefyoshi
Created October 5, 2013 06:50
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save laclefyoshi/6837562 to your computer and use it in GitHub Desktop.
Save laclefyoshi/6837562 to your computer and use it in GitHub Desktop.
(defun flymake-scalastyle-init ()
(let* ((temp-file (flymake-init-create-temp-buffer-copy
'flymake-create-temp-inplace))
(local-file (file-relative-name
temp-file
(file-name-directory buffer-file-name))))
(list "~/.local/bin/scalastyle.sh" (list local-file))))
(add-to-list 'flymake-allowed-file-name-masks
'("\\.scala\\'" flymake-scalastyle-init))
(add-hook 'scala-mode-hook
'(lambda ()
(flymake-mode t)))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment