[dokuwiki] Re: Result of running http://www.jslint.com/ on the "discussion" plugin's file named "script.js"
- From: Myron Turner <turnermm02@xxxxxxx>
- To: dokuwiki@xxxxxxxxxxxxx
- Date: Tue, 02 Jun 2009 09:46:05 -0500
Kingsley G. Morse Jr. wrote:
The main reason I'm writing is to report the
result of an on-line tool that checks javascript,
when asked to check the "discussion" plugin's file
named "script.js.
The output follows below....
=====================Output Follows==========================
Error:
Problem at line 26 character 15: Expected '{' and instead saw 'return'.
if(!form) return;
Problem at line 55 character 34: Expected '{' and instead saw 'return'.
if(!document.getElementById) return;
Problem at line 59 character 18: Expected '{' and instead saw 'return'.
if(!comment) return;
Problem at line 86 character 88: Missing semicolon.
initToolbar("discussion__comment_toolbar", "discussion__comment_text"...
Problem at line 93 character 14: Expected '{' and instead saw 'return'.
if(!btn) return;
Problem at line 100 character 15: Expected '{' and instead saw 'return'.
if(!form) return;
--Like a lot of such tools, this one seems to be a purist. It seems to want brackets after the if statements:
if(x) {
blah_blah;
}
In fact, Flanagan, in section 6.3 of Javascript The Definitive Guide
(O'Reilly), defines the if statement without brackets:
if(expression)
statement
Judging from this lint's output there's nothing wrong with the script.
The discussion plugin, which I use, works without error.
_____________________ Myron Turner http://www.room535.org http://www.mturner.org http://net18reaching.org/cityscapes _________________________________________________________ Searchable Database of Art and New Media News Feeds Over 500,000 news items supplied in response to queries http://net18reaching.org/artrss -- DokuWiki mailing list - more info at http://wiki.splitbrain.org/wiki:mailinglist
- Follow-Ups:
- References:
- [dokuwiki] Result of running http://www.jslint.com/ on the "discussion" plugin's file named "script.js"
- From: Kingsley G. Morse Jr.
- [dokuwiki] Result of running http://www.jslint.com/ on the "discussion" plugin's file named "script.js"
Other related posts:
- » [dokuwiki] Result of running http://www.jslint.com/ on the "discussion" plugin's file named "script.js" - Kingsley G. Morse Jr.
- » [dokuwiki] Re: Result of running http://www.jslint.com/ on the "discussion" plugin's file named "script.js" - Andreas Gohr
- » [dokuwiki] Re: Result of running http://www.jslint.com/ on the "discussion" plugin's file named "script.js" - Kingsley G. Morse Jr.
- » [dokuwiki] Re: Result of running http://www.jslint.com/ on the "discussion" plugin's file named "script.js" - Andreas Gohr
- » [dokuwiki] Re: Result of running http://www.jslint.com/ on the "discussion" plugin's file named "script.js" - Michael Klier
- » [dokuwiki] Re: Result of running http://www.jslint.com/ on the "discussion" plugin's file named "script.js" - Jerry Schwartz
- » [dokuwiki] Re: Result of running http://www.jslint.com/ on the "discussion" plugin's file named "script.js" - Myron Turner
- » [dokuwiki] Re: Result of running http://www.jslint.com/ on the "discussion" plugin's file named "script.js" - James Lin
- » [dokuwiki] Re: Result of running http://www.jslint.com/ on the "discussion" plugin's file named "script.js" - Myron Turner
- » [dokuwiki] Re: Result of running http://www.jslint.com/ on the "discussion" plugin's file named "script.js" - Myron Turner