[OpenLayers-Dev] jslint results

Paul Spencer pspencer at dmsolutions.ca
Mon Oct 15 21:34:35 EDT 2007

Hi devs,

I finally got around to hacking my jslint support to run across all  
files in a directory structure rather than just a single file and got  
these results on trunk:

Warnings about missing semi-colons:

firebug.js: 3 warnings
firebugx.js: 1 warning
Ajax.js: 5 warnings
Class.js: 5 warnings
EditingToolbar.js: 1 warning
LayerSwitcher.js: 1 warning
MouseDefaults.js: 1 warning
MouseToolbar.js: 1 warning
PanZoomBar.js: 4 warnings
Events.js: 1 warning
Vector.js: 1 warning
WFS.js: 1 warning
GeoJSON.js: 4 warnings
WKT.js: 1 warning
Polygon.js: 1 warning
Drag.js: 3 warnings
EventPane.js: 2 warnings
Google.js: 2 warnings
MultiMap.js: 2 warnings
VirtualEarth: 2 warnings
Yahoo.js: 2 warnings
Layer.js: 1 warning
VML.js: 2 warnings
Image.js: 1 warning
Util.js: 6 warnings
Rico/Color.js: 4 warnings
Rico/Corner.js: 3 warnings
tests/throws.js: 1 warning

OpenLayers.js: 1 warning  regular expressions should be preceded by a  
left parenthesis, assignment, colon, or comma
             if (/MSIE/.test(navigator.userAgent) || /Safari/.test 
(navigator.userAgent)) {

The semi-colon warnings are all trivial and browsers work around them  
no problem.  The only issue can be in compression and I think the  
compression engine used is smart enough to add a semi-colon where it  
needs one. However, it would probably be a good idea to fix these  
warnings anyway.  My little tool contains hyperlinks back to the file/ 
line with the problem so it is trivial albeit time consuming for me  
to fix them if everyone agrees.

The regular expression one I am not so sure about.  Anyone know  
anything about javascript syntax in this particular case?



|Paul Spencer                          pspencer at dmsolutions.ca    |
|Chief Technology Officer                                         |
|DM Solutions Group Inc                http://www.dmsolutions.ca/ |

More information about the Dev mailing list