You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cordova.apache.org by "Filip Maj (Created) (JIRA)" <ji...@apache.org> on 2012/04/18 02:03:13 UTC

[jira] [Created] (CB-530) Run jslint/jshint in cordova-js every time you build

Run jslint/jshint in cordova-js every time you build
----------------------------------------------------

                 Key: CB-530
                 URL: https://issues.apache.org/jira/browse/CB-530
             Project: Apache Callback
          Issue Type: Improvement
          Components: CordovaJS
            Reporter: Filip Maj
            Assignee: Filip Maj
             Fix For: 1.7.0


Just to catch simple syntax errors.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Resolved] (CB-530) Run jslint/jshint in cordova-js every time you build

Posted by "Filip Maj (Resolved) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CB-530?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Filip Maj resolved CB-530.
--------------------------

    Resolution: Fixed

It's in as of [3043d5|http://git-wip-us.apache.org/repos/asf?p=incubator-cordova-js.git;a=commit;h=3043d5c7e6a1a6e32b2b068c3cc4469f607bf4a1].
                
> Run jslint/jshint in cordova-js every time you build
> ----------------------------------------------------
>
>                 Key: CB-530
>                 URL: https://issues.apache.org/jira/browse/CB-530
>             Project: Apache Callback
>          Issue Type: Improvement
>          Components: CordovaJS
>            Reporter: Filip Maj
>            Assignee: Filip Maj
>             Fix For: 1.7.0
>
>
> Just to catch simple syntax errors.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (CB-530) Run jslint/jshint in cordova-js every time you build

Posted by "Patrick Mueller (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CB-530?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13256702#comment-13256702 ] 

Patrick Mueller commented on CB-530:
------------------------------------

Absolutely no problems adding this to the build, as long as - when we are done cleaning up the warnings - it generates no extraneous junk to the console.  

Obviously, if someone injects something objectionable to jshint AFTER the clean up, we need to decide: 

1) do we fix the code so jshint shuts up
2) do we add more jshint config to get it to shut up about the thing it's complaining about

Play it by ear.

I just want the build to be noise-free when it "succeeds".
                
> Run jslint/jshint in cordova-js every time you build
> ----------------------------------------------------
>
>                 Key: CB-530
>                 URL: https://issues.apache.org/jira/browse/CB-530
>             Project: Apache Callback
>          Issue Type: Improvement
>          Components: CordovaJS
>            Reporter: Filip Maj
>            Assignee: Filip Maj
>             Fix For: 1.7.0
>
>
> Just to catch simple syntax errors.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (CB-530) Run jslint/jshint in cordova-js every time you build

Posted by "Filip Maj (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CB-530?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13256680#comment-13256680 ] 

Filip Maj commented on CB-530:
------------------------------

I've added this functionality to a [branch on my fork|http://github.com/filmaj/incubator-cordova-js/tree/hint]. For now, yes, it's an explicit task (run with {{jake hint}}). I'm thinking once most of the warnings are cleaned up, we actually include as part of the build.

I added jshint as an npm module (so if you pull down run {{npm install}}) and it wires directly into the Jakefile.
                
> Run jslint/jshint in cordova-js every time you build
> ----------------------------------------------------
>
>                 Key: CB-530
>                 URL: https://issues.apache.org/jira/browse/CB-530
>             Project: Apache Callback
>          Issue Type: Improvement
>          Components: CordovaJS
>            Reporter: Filip Maj
>            Assignee: Filip Maj
>             Fix For: 1.7.0
>
>
> Just to catch simple syntax errors.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (CB-530) Run jslint/jshint in cordova-js every time you build

Posted by "Patrick Mueller (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CB-530?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13256154#comment-13256154 ] 

Patrick Mueller commented on CB-530:
------------------------------------

I can only guess that you're suggesting this be added to the cordova-js Jakefile, but the subject reads like you're expecting people to run it by hand.  Just curious.

Also, if it's JUST to catch simple syntax errors, then there might be easier stories.  For instance, what happens if you "run" the cordova-*.js files with node, right now?  I suspect they'll start complaining about "window" etal.  We could, however, change the structure of the resulting file such that there really wasn't much directly executable code - make sure almost everything was wrapped in functions, and then sniff for node in the "main" executable part and just not execute whatever would be executed in the browser (or sniff for "window", etc).
                
> Run jslint/jshint in cordova-js every time you build
> ----------------------------------------------------
>
>                 Key: CB-530
>                 URL: https://issues.apache.org/jira/browse/CB-530
>             Project: Apache Callback
>          Issue Type: Improvement
>          Components: CordovaJS
>            Reporter: Filip Maj
>            Assignee: Filip Maj
>             Fix For: 1.7.0
>
>
> Just to catch simple syntax errors.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (CB-530) Run jslint/jshint in cordova-js every time you build

Posted by "Filip Maj (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CB-530?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13256737#comment-13256737 ] 

Filip Maj commented on CB-530:
------------------------------

I would think that as long as it's not in the SCM it's OK. The dependencies are really just development dependencies, none of that code ends up in what we ship.

I'll clean up the jshint warnings and commit it into master, then.
                
> Run jslint/jshint in cordova-js every time you build
> ----------------------------------------------------
>
>                 Key: CB-530
>                 URL: https://issues.apache.org/jira/browse/CB-530
>             Project: Apache Callback
>          Issue Type: Improvement
>          Components: CordovaJS
>            Reporter: Filip Maj
>            Assignee: Filip Maj
>             Fix For: 1.7.0
>
>
> Just to catch simple syntax errors.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (CB-530) Run jslint/jshint in cordova-js every time you build

Posted by "Patrick Mueller (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CB-530?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13256707#comment-13256707 ] 

Patrick Mueller commented on CB-530:
------------------------------------

Since you mention "added jshint as an npm module", we probably need to decide what we're going to do about these npm modules we are pre-req'ing.

For weinre, they're stored in git, and I should be "shrinkwrapping" them as well [1], but am not right now.  Lots of upsides to this, one big downside: since the modules are stored in Apache's git, they need to have LICENSEy bits applied.  See [2] for what I'm doing in weinre.  Note that you need to add the LICENSEy bits recursively, to packages that the packages we explicitly pre-req, pre-req.

Alternatively, we can do what we do now, which is to just say "run `npm install` before doing your build (or whatever it is we do).  It's not completely clear to me if this is really kosher wrt: Apache-ness or not, but since this goop isn't (currently) shipped in our runtimes, only used to build our runtimes, it's less sensitive to the "everything must be in the SCM" mantra.

[1] http://npmjs.org/doc/shrinkwrap.html
[2] https://github.com/apache/incubator-cordova-weinre/blob/master/LICENSE#L205
                
> Run jslint/jshint in cordova-js every time you build
> ----------------------------------------------------
>
>                 Key: CB-530
>                 URL: https://issues.apache.org/jira/browse/CB-530
>             Project: Apache Callback
>          Issue Type: Improvement
>          Components: CordovaJS
>            Reporter: Filip Maj
>            Assignee: Filip Maj
>             Fix For: 1.7.0
>
>
> Just to catch simple syntax errors.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (CB-530) Run jslint/jshint in cordova-js every time you build

Posted by "Filip Maj (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CB-530?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13257112#comment-13257112 ] 

Filip Maj commented on CB-530:
------------------------------

If you are interested in checking out these changes, have a peek at my fork:

http://github.com/filmaj/incubator-cordova-js/tree/hint

I will merge sometime this week unless people have an issue with this.
                
> Run jslint/jshint in cordova-js every time you build
> ----------------------------------------------------
>
>                 Key: CB-530
>                 URL: https://issues.apache.org/jira/browse/CB-530
>             Project: Apache Callback
>          Issue Type: Improvement
>          Components: CordovaJS
>            Reporter: Filip Maj
>            Assignee: Filip Maj
>             Fix For: 1.7.0
>
>
> Just to catch simple syntax errors.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira