quality
quality copied to clipboard
Groovy support
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)