Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Groovy support #67

Open
apiology opened this issue Sep 22, 2016 · 0 comments
Open

Groovy support #67

apiology opened this issue Sep 22, 2016 · 0 comments

Comments

@apiology
Copy link
Owner

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)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant