Skip to content

Commit

Permalink
Don't fail build when jshint warnings are found, fixes eriwen#19
Browse files Browse the repository at this point in the history
  • Loading branch information
eriwen committed Jun 20, 2012
1 parent 8b2c29e commit dd655f2
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 9 deletions.
12 changes: 5 additions & 7 deletions plugin.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,11 @@ repositories {

apply plugin: 'js'

javascript {
source {
custom {
js {
srcDir "src/test/resources"
include "file*.js"
}
javascript.source {
custom {
js {
srcDir "src/test/resources"
include "file*.js"
}
}
}
Expand Down
3 changes: 2 additions & 1 deletion src/main/groovy/com/eriwen/gradle/js/RhinoExec.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,13 @@ class RhinoExec {
private static final String RHINO_MAIN_CLASS = 'org.mozilla.javascript.tools.shell.Main'
Project project

void execute(final Iterable<String> execargs, final String workingDirIn = '.') {
void execute(final Iterable<String> execargs, final String workingDirIn = '.', final Boolean ignoreExitCode = false) {
def options = {
main = RHINO_MAIN_CLASS
classpath = project.configurations.rhino
args = execargs
workingDir = workingDirIn
ignoreExitValue = ignoreExitCode
}

project.javaexec(options)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,6 @@ class JsHintTask extends SourceTask {
new File(project.buildDir, TMP_DIR), JSHINT_PATH)
final List<String> args = [jshintJsFile.canonicalPath]
args.addAll(source.files.collect { it.canonicalPath })
rhino.execute(args)
rhino.execute(args, '.', true)
}
}

0 comments on commit dd655f2

Please sign in to comment.