quality icon indicating copy to clipboard operation
quality copied to clipboard

Groovy support

Open apiology opened this issue 8 years ago • 0 comments

See flycheck's approach

(flycheck-define-checker groovy
  "A groovy syntax checker using groovy compiler API.

See URL `http://www.groovy-lang.org'."
  :command ("groovy" "-e"
            "import org.codehaus.groovy.control.*

file = new File(args[0])
unit = new CompilationUnit()
unit.addSource(file)

try {
    unit.compile(Phases.CONVERSION)
} catch (MultipleCompilationErrorsException e) {
    e.errorCollector.write(new PrintWriter(System.out, true), null)
}
"
            source)
  :error-patterns
  ((error line-start (file-name) ": " line ":" (message)
          " @ line " line ", column " column "." line-end))
  :modes groovy-mode)

apiology avatar Sep 22 '16 23:09 apiology