[Building Sakai] Javascript static code review question

Eli Cochran eli at media.berkeley.edu
Fri Nov 20 14:12:43 PST 2009


Alan,
I have a lot of experience with jslint and I like it a lot. The errors that it finds are rarely "bugs" but more things that could get you into trouble or are good practices. Still very useful. 

Automated code review tools are tricky in JS as it is a loosely typed, interpreted language. But maybe there is work in this area that I'm missing... I haven't looked very hard. 

Ah, I just remembered a nice tool (http://mankz.com/code/GlobalCheck.htm) that analyzes the number of variables put into the global namespace. Then again, jslint will catch those too. 

Javascript namespace pollution is a particular problem in Sakai (even my own contributions). But again, this isn't technically "a bug" unless your var collides with someone else's var.

- Eli Cochran


On Nov 20, 2009, at 5:04 AM, Berg, A.M. wrote:

> Hi fellow hard workers,
> 
> I was wondering if anyone has had experience of tools that code review JavaScript. I have jslint running from the command line and it produces lots of warnings and most of them appear to be minor in extent. Does anyone else use Jslint or are there better tools in the marketplace?
> 
> Please share your experience.
> 
> Alan
> 
> Alan Berg
> Interim QA Director - The Sakai Foundation
> 
> Senior Developer / Quality Assurance
> Group Education and Research Services
> Central Computer Services
> University of Amsterdam
> 
> http://home.uva.nl/a.m.berg
> 
> 
> 
> 
> _______________________________________________
> sakai-dev mailing list
> sakai-dev at collab.sakaiproject.org
> http://collab.sakaiproject.org/mailman/listinfo/sakai-dev
> 
> TO UNSUBSCRIBE: send email to sakai-dev-unsubscribe at collab.sakaiproject.org with a subject of "unsubscribe"

. . . . . . . . . . .  .  .   .    .      .         .              .                     .

Eli Cochran
user interaction developer
ETS, UC Berkeley


-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://collab.sakaiproject.org/pipermail/sakai-dev/attachments/20091120/740299e4/attachment.html 


More information about the sakai-dev mailing list