<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Jabbering Giraffe &#187; lint</title>
	<atom:link href="http://happygiraffe.net/blog/tag/lint/feed/" rel="self" type="application/rss+xml" />
	<link>http://happygiraffe.net/blog</link>
	<description></description>
	<lastBuildDate>Wed, 19 Oct 2011 10:40:06 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
<atom:link rel="hub" href="http://pubsubhubbub.appspot.com"/><atom:link rel="hub" href="http://superfeedr.com/hubbub"/>		<item>
		<title>JavaScript on OSX</title>
		<link>http://happygiraffe.net/blog/2006/06/11/javascript-on-osx/</link>
		<comments>http://happygiraffe.net/blog/2006/06/11/javascript-on-osx/#comments</comments>
		<pubDate>Sun, 11 Jun 2006 14:24:00 +0000</pubDate>
		<dc:creator>Dominic Mitchell</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[lint]]></category>
		<category><![CDATA[osx]]></category>

		<guid isPermaLink="false">http://happygiraffe.net/2006/06/11/javascript-on-osx/</guid>
		<description><![CDATA[So, after my little rant a few days ago, I&#8217;ve now gotten JavaScript::JSLint up and running. But that involves downloading a lot of Perl modules, and installing SpiderMonkey, which is a none too pleasant task. However, the Mac should already &#8230; <a href="http://happygiraffe.net/blog/2006/06/11/javascript-on-osx/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>So, after my little <a href="http://happygiraffe.net/blog/archives/2006/05/29/jslint">rant</a> a few days ago, I&#8217;ve now gotten <a href="http://search.cpan.org/dist/JavaScript-JSLint/">JavaScript::JSLint</a> up and running.  But that involves downloading a lot of Perl modules, and installing SpiderMonkey, which is a none too pleasant task.  However, the Mac should already have JavaScript built in&#8212;<a href="http://en.wikipedia.org/wiki/JavaScriptCore">JavaScriptCore</a>, which is part of WebKit, which is used to build Safari.</p>
<p>So, I&#8217;ve spent an interesting couple of days learning Objective-C, Cocoa and nosing around the Apple developer documentation in order to see how to get at the JavaScriptCore.  And, as far as I can see, you can&#8217;t.</p>
<p>The best I came up with is <a href="http://developer.apple.com/documentation/Cocoa/Conceptual/DisplayWebContent/Tasks/JavaScriptFromObjC.html">Using JavaScript From Objective-C</a>.  Which sounds nice and well, but from what I can make out, it&#8217;s predicated on having a window hanging around, which I want to avoid (I want a command line tool).  It also doesn&#8217;t provide any interfaces to bind your own functions into the JavaScript interpreter.</p>
<p>Now, JavaScriptCore happens to be one of the Open Source parts of <span class="caps">OSX</span>.  So, I can just download it, build my own wrapper, and so on.  But it is annoying that I have to do so when the system comes with a perfectly good JavaScript interpreter of its own.  Not only that, but it&#8217;s an alternative implementation to spidermonkey (based on <a href="http://en.wikipedia.org/wiki/KJS"><span class="caps">KJS</span></a> from <span class="caps">KDE</span>).  And more implementations usually leads to a healthier ecosystem for a programming language.</p>
<p>In the meantime, anybody wanting (relatively) quick access to a lint for JavaScript on osx should probably look at <a href="http://javascriptlint.com/">javascriptlint</a> instead.  It still needs compiling, but it produces a single file which has no dependencies.</p>
<p>Mind you, I&#8217;m still glad at the time I&#8217;ve spent.  Objective-C is rather nice (apart from the lack of garbage collection&#8212;refcounts make me nervous).  And Interface Builder is the nicest <span class="caps">GUI</span> builder I&#8217;ve yet seen.  Or at least it&#8217;s the only one that didn&#8217;t make me run away screaming.</p>
<p><strong>Update</strong>: Looks like I missed <a href="http://www.latenightsw.com/freeware/JavaScriptOSA/">JavaScript <span class="caps">OSA</span></a>.  But that doesn&#8217;t look like it&#8217;s been updated in years.</p>
]]></content:encoded>
			<wfw:commentRss>http://happygiraffe.net/blog/2006/06/11/javascript-on-osx/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>New Releases</title>
		<link>http://happygiraffe.net/blog/2006/06/05/new-releases/</link>
		<comments>http://happygiraffe.net/blog/2006/06/05/new-releases/#comments</comments>
		<pubDate>Mon, 05 Jun 2006 23:24:00 +0000</pubDate>
		<dc:creator>Dominic Mitchell</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[cpan]]></category>
		<category><![CDATA[lint]]></category>
		<category><![CDATA[perl]]></category>
		<category><![CDATA[svn]]></category>

		<guid isPermaLink="false">http://happygiraffe.net/2006/06/05/new-releases/</guid>
		<description><![CDATA[I&#8217;ve just done a couple of new releases of my modules: JavaScript::JSLint 0.04, which is just renaming from Lint to JSLint to more accurately reflect where it&#8217;s come from (pointed out by Matthias Miller). subatom 0.07 which switches from the &#8230; <a href="http://happygiraffe.net/blog/2006/06/05/new-releases/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve just done a couple of new releases of my modules:</p>
<ul>
<li><a href="http://search.cpan.org/~hdm/JavaScript-JSLint-0.04/">JavaScript::JSLint 0.04</a>, which is just renaming from Lint to JSLint to more accurately reflect where it&#8217;s come from (pointed out by Matthias Miller).</li>
<li><a href="http://search.cpan.org/~hdm/subatom-0.07/">subatom 0.07</a> which switches from the baroque <span class="caps">XML</span>::Atom api to the much nicer <span class="caps">XML</span>::Atom::SimpleFeed (thanks, Aristotle).</li>
<li><a href="http://search.cpan.org/~hdm/subatom-0.08/">subatom 0.08</a> because I am a doofus and left a warn statement in.</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://happygiraffe.net/blog/2006/06/05/new-releases/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>JSLint Backlash</title>
		<link>http://happygiraffe.net/blog/2006/06/04/jslint-backlash/</link>
		<comments>http://happygiraffe.net/blog/2006/06/04/jslint-backlash/#comments</comments>
		<pubDate>Sun, 04 Jun 2006 19:20:00 +0000</pubDate>
		<dc:creator>Dominic Mitchell</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[lint]]></category>

		<guid isPermaLink="false">http://happygiraffe.net/2006/06/04/jslint-backlash/</guid>
		<description><![CDATA[Typically enough, two days after I start on something, there&#8217;s a backlash. Dean Edwards (whom I respect highly) points out that JSLint is not a silver bullet in JSLint Considered Harmful. (aside: everybody please read &#8216;Considered Harmful&#8217; Essays Considered Harmful. &#8230; <a href="http://happygiraffe.net/blog/2006/06/04/jslint-backlash/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Typically enough, two days after I start on <a href="http://search.cpan.org/dist/JavaScript-Lint/">something</a>, there&#8217;s a backlash.  Dean Edwards (whom I respect highly) points out that JSLint is not a silver bullet in <a href="http://dean.edwards.name/weblog/2006/06/jslint/">JSLint Considered Harmful</a>.</p>
<p>(aside: everybody please read <a href="http://www.meyerweb.com/eric/comment/chech.html">&#8216;Considered Harmful&#8217; Essays Considered Harmful</a>.  Thank you)</p>
<p>The <a href="http://jquery.com/discuss/2006-June/001545/">post</a> he links to brings up a number of valid points about where valid uses of JavaScript can be flagged up by <a href="http://jslint.com/">JSLint</a>.  This is perfectly reasonable.  For example, you rarely want to use <code>eval()</code> in JavaScript, but when you need it, it&#8217;s the only way to do what you want.  In that case, JSLint provides a flag to disable the warning.</p>
<p>But the real point is that you can&#8217;t just blindly follow results from a tool for what are ultimately stylistic issues like these.  You have to use your knowledge as a programmer to interpret the output and agree / disagree with each point as appropriate.  The purpose of JSLint is to flag areas that <em>might</em> be of concern, or <em>perhaps</em> be liable to bugs.  It&#8217;s not saying &#8220;this is a bug, absolutely, for sure&#8221;.</p>
<p>One thing which might be useful (although I have no idea how easy it would be to implement) would be to be able to specify hints in the same manner that you could for <a href="http://www.freebsd.org/cgi/man.cgi?query=lint&#38;manpath=FreeBSD+6.0-stable&#38;format=html">C lint</a>.  There is already one <a href="http://jslint.com/lint.html#Global">example</a> (declaring external definitions), but there could be more.</p>
<p>Whilst I am sure that it has it&#8217;s flaws, I&#8217;m extremely glad to see tools like JSLint being made available.  Analysis tools like these help to move JavaScript from being &#8220;toy for websites&#8221; to &#8220;useful programming language&#8221;.</p>
<p>Now all I want is a JavaScript equivalent of <a href="http://perltidy.sourceforge.net/">perltidy</a>&#8230;</p>
]]></content:encoded>
			<wfw:commentRss>http://happygiraffe.net/blog/2006/06/04/jslint-backlash/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>JavaScript::Lint 0.02</title>
		<link>http://happygiraffe.net/blog/2006/06/04/javascript-lint-0-02/</link>
		<comments>http://happygiraffe.net/blog/2006/06/04/javascript-lint-0-02/#comments</comments>
		<pubDate>Sun, 04 Jun 2006 11:28:00 +0000</pubDate>
		<dc:creator>Dominic Mitchell</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[cpan]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[lint]]></category>
		<category><![CDATA[perl]]></category>

		<guid isPermaLink="false">http://happygiraffe.net/2006/06/04/javascript-lint-0-02/</guid>
		<description><![CDATA[I&#8217;ve just put together a new version of JavaScript::Lint. The main new thing is that you can now specify options to control how the lint works. You probably want to enable the undef option, for instance. I also fixed a &#8230; <a href="http://happygiraffe.net/blog/2006/06/04/javascript-lint-0-02/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve just put together a new version of <a href="http://search.cpan.org/~HDM/JavaScript-Lint-0.02/">JavaScript::Lint</a>.  The main new thing is that you can now specify options to control how the lint works.  You probably want to enable the <em>undef</em> option, for instance.</p>
<p>I also fixed a problem where I was covering up errors when the lint couldn&#8217;t do anything more (e.g. nested comments).  After my mailing Douglas Crockford about it, he kindly pointed out that this was mentioned in the comments.  I&#8217;d entirely missed it.  Ah well.  Anyway, it now returns a &#8220;cannot proceed&#8221; message.</p>
<p><strong>Update</strong>: after spotting something rather stupid, I&#8217;ve now uploaded <a href="http://search.cpan.org/~HDM/JavaScript-Lint-0.03/">JavaScript::Lint 0.03</a> instead.</p>
]]></content:encoded>
			<wfw:commentRss>http://happygiraffe.net/blog/2006/06/04/javascript-lint-0-02/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>JavaScript::Lint</title>
		<link>http://happygiraffe.net/blog/2006/06/02/javascript-lint/</link>
		<comments>http://happygiraffe.net/blog/2006/06/02/javascript-lint/#comments</comments>
		<pubDate>Fri, 02 Jun 2006 19:36:00 +0000</pubDate>
		<dc:creator>Dominic Mitchell</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[cpan]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[lint]]></category>
		<category><![CDATA[perl]]></category>

		<guid isPermaLink="false">http://happygiraffe.net/2006/06/02/javascript-lint/</guid>
		<description><![CDATA[After whinging gratuitously about how cruddy non-browser JavaScript is, Mark Fowler kindly pointed me in the right direction to get Perl integration working: JavaScript.pm. So now I&#8217;ve wrapped up JSLint into a small command line tool (and Perl lib), JavaScript::Lint. &#8230; <a href="http://happygiraffe.net/blog/2006/06/02/javascript-lint/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>After <a href="http://happygiraffe.net/blog/archives/2006/05/29/jslint">whinging gratuitously</a> about how cruddy non-browser JavaScript is, Mark Fowler kindly pointed me in the right direction to get Perl integration working: <a href="http://search.cpan.org/dist/JavaScript/">JavaScript.pm</a>.</p>
<p>So now I&#8217;ve wrapped up <a href="http://jslint.com/">JSLint</a> into a small command line tool (and Perl lib), <a href="http://search.cpan.org/dist/JavaScript-Lint/">JavaScript::Lint</a>.</p>
<p>It&#8217;s fairly simple at the moment.  I plan to add support for the options in jslint soon.</p>
]]></content:encoded>
			<wfw:commentRss>http://happygiraffe.net/blog/2006/06/02/javascript-lint/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>

