Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Syntax Checking

Delisa Mason edited this page · 3 revisions

Redcar supports Syntax Checking for Ruby, Javascript, Java, Mirah, and Groovy. Syntax is checked upon file save, and can be disabled from the menu in Plugins > Syntax Checking.

Ruby

Ruby syntax checking runs in 1.8 mode by default, unless JRuby is started with the --1.9 flag

Javascript

JavaScript

Javascript syntax checking is provided using JSLint. It can be configured using JSLint option comments

Java and Groovy

Groovy

Groovy

Java and Groovy syntax checking supports adding files to the classpath before checking syntax, for dependency validation. To enabled, write a script in [project root]/.redcar/classpath.groovy which will return the proper paths as an array.

Example: (See here for an extended example)

// classpath retriever for all jars in project "lib" folder and compiled classes in project
// TODO: Add groovy grape to pull ivy dependencies
def redcar_config  = new File(getClass().protectionDomain.codeSource.location.path).parentFile
def project        = redcar_config.parentFile

def classpath      = []

//compiled classes
def target_classes = new File(project.path + File.separator + "target" + File.separator + "classes")
classpath << target_classes.path

//installed libraries
def lib            = new File(project.path + File.separator + "lib")
lib.list().each {name -> classpath << lib.path+File.separator+name}

return classpath.toArray()

‹‹ Back to User's Guide

Something went wrong with that request. Please try again.