Permalink
Browse files

gh-4 Start of flycheck

  • Loading branch information...
Matthew O. Smith
Matthew O. Smith committed Jan 16, 2014
1 parent 1c44d28 commit e021e092778c7a883348580ebf9e0ef99f1211f1
Showing with 37 additions and 0 deletions.
  1. +37 −0 src/main/lisp/malabar-flycheck.el
@@ -0,0 +1,37 @@
+;;; malabar-flycheck.el --- Flycheck integration
+;;
+;; Copyright (c) 2014 Matthew O. Smith <matt@m0smith.com>
+;;
+;; This program is free software; you can redistribute it and/or
+;; modify it under the terms of the GNU General Public License as
+;; published by the Free Software Foundation; either version 2 of the
+;; License, or (at your option) any later version.
+;;
+;; This program is distributed in the hope that it will be useful, but
+;; WITHOUT ANY WARRANTY; without even the implied warranty of
+;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+;; General Public License for more details.
+;;
+;; You should have received a copy of the GNU General Public License
+;; along with this program; if not, write to the Free Software
+;; Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+;; 02110-1301 USA.
+;;
+
+(require 'flycheck)
+
+;; (defun javac ()
+;; (let ((buf (current-buffer)))
+;; (with-current-buffer (pop-to-buffer "*l*")
+;; (call-process "javac" nil t nil
+;; "-cp" (malabar-classpath-test buf)
+;; (malabar-util-expand-file-name (buffer-file-name buf))))))
+
+
+(flycheck-define-checker malabar-mode-javac
+ "Syntax java code on the fly"
+ :command ("javac"
+ "-cp" (eval (malabar-classpath-test))
+ (eval (malabar-util-expand-file-name (buffer-file-name))))
+ :error-parser flycheck-parse-checkstyle
+ :modes malabar-mode)

0 comments on commit e021e09

Please sign in to comment.