Skip to content
This repository has been archived by the owner on Jul 17, 2022. It is now read-only.

JSHint predef/options not working #93

Open
tnbalu opened this issue Apr 28, 2014 · 0 comments
Open

JSHint predef/options not working #93

tnbalu opened this issue Apr 28, 2014 · 0 comments

Comments

@tnbalu
Copy link

tnbalu commented Apr 28, 2014

Hi,
I have the below task, the options /predef is not working, any suggestion, Trying to suppress the "Mixed spaces and tabs." but it is always comming

        target.task('jsHint'){
            doFirst {
                target.javascript.source {
                    dev {
                        js {
                            srcDir "${target.sourceSets.main.output.resourcesDir}"
                            include "**/*-src-*.js"
                        }
                    }
                }
                target.javascript.source.dev.js.files.eachWithIndex { jsFile, idx ->
                    target.tasks.add(name: "jsHints${idx}", type: com.eriwen.gradle.js.tasks.JsHintTask) {
                        source = jsFile
                        String fileName = "${jsFile.name}"
                        println "Ccheck Style Validating File:::::::::::::::::::::::::::::::::::::::::::::" + fileName
                        //reporter = "checkstyle"
                        //target."jsHints${idx}".options=[ expr: "true", unused: "true", curly: "true", global: [ "NoesisCode": false ] ]
                        ext{predef=[noempty:"false",undef:"false",unused:"false",smarttabs:"false"]}
                        //target."jsHints${idx}".predef=[NoesisCode: "false",smarttabs:"true"]
                        //predef=[noempty:false,undef:false,unused:false,smarttabs:true]
                        //dest = "${target.sourceSets.main.output.resourcesDir}/${jsFile.name}_jshint.out"
                        ignoreExitCode=true
                        outputToStdOut=true                                     
                    }       
                }
                target.tasks.findAll { task -> 
                if(task.name.startsWith("jsHints"))
                    task.execute()
                }       
            }
        }
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant