[javascriptlint-commit] SF.net SVN: javascriptlint:[269] trunk
Status: Beta
Brought to you by:
matthiasmiller
From: <mat...@us...> - 2009-10-07 19:56:23
|
Revision: 269 http://javascriptlint.svn.sourceforge.net/javascriptlint/?rev=269&view=rev Author: matthiasmiller Date: 2009-10-07 19:56:09 +0000 (Wed, 07 Oct 2009) Log Message: ----------- www: avoid hardcode URLs whenever possible Modified Paths: -------------- trunk/www/news/001 trunk/www/news/002 trunk/www/news/003 trunk/www/news/004 trunk/www/news/005 trunk/www/news/006 trunk/www/news/007 trunk/www/news/008 trunk/www/news/009 trunk/www/news/010 trunk/www/news/011 trunk/www/news/012 trunk/www/news/013 trunk/www/news/014 trunk/www/news/015 trunk/www/news/016 trunk/www/news/017 trunk/www/news/018 trunk/www/news/019 trunk/www/news/020 trunk/www/news/021 trunk/www/news/022 trunk/www/news/023 trunk/www/news/index.rss trunk/www.py Modified: trunk/www/news/001 =================================================================== --- trunk/www/news/001 2009-10-07 19:39:23 UTC (rev 268) +++ trunk/www/news/001 2009-10-07 19:56:09 UTC (rev 269) @@ -3,7 +3,7 @@ @title=News --> -## [JavaScript Lint 0.1b Released](http://www.javascriptlint.com/news/001) +## [JavaScript Lint 0.1b Released](__BASENAME__) _Tue, 30 Aug 2005 15:37:08 +0000_ This release fixes a crash caused by certain syntax errors. For example: _if (a !=== b)_. Modified: trunk/www/news/002 =================================================================== --- trunk/www/news/002 2009-10-07 19:39:23 UTC (rev 268) +++ trunk/www/news/002 2009-10-07 19:56:09 UTC (rev 269) @@ -3,7 +3,7 @@ @title=News --> -## [JavaScript Lint 0.1c Released](http://www.javascriptlint.com/news/002) +## [JavaScript Lint 0.1c Released](__BASENAME__) _Tue, 30 Aug 2005 18:54:06 +0000_ This release corrects problems with the wildcard feature. Modified: trunk/www/news/003 =================================================================== --- trunk/www/news/003 2009-10-07 19:39:23 UTC (rev 268) +++ trunk/www/news/003 2009-10-07 19:56:09 UTC (rev 269) @@ -3,7 +3,7 @@ @title=News --> -## [JavaScript Lint 0.1d Released](http://www.javascriptlint.com/news/003) +## [JavaScript Lint 0.1d Released](__BASENAME__) _Tue, 30 Aug 2005 22:28:35 +0000_ This release fixes a crash caused by an incorrectly formed control comment. Modified: trunk/www/news/004 =================================================================== --- trunk/www/news/004 2009-10-07 19:39:23 UTC (rev 268) +++ trunk/www/news/004 2009-10-07 19:56:09 UTC (rev 269) @@ -3,7 +3,7 @@ @title=News --> -## [JavaScript Lint 0.1e Released](http://www.javascriptlint.com/news/004) +## [JavaScript Lint 0.1e Released](__BASENAME__) _Tue, 31 Aug 2005 02:40:49 +0000_ This release fixes a crash triggered by the following statement: _for(i = 0; i < 5; )_. (The Linux binary is not currently available for this release.) Modified: trunk/www/news/005 =================================================================== --- trunk/www/news/005 2009-10-07 19:39:23 UTC (rev 268) +++ trunk/www/news/005 2009-10-07 19:56:09 UTC (rev 269) @@ -3,7 +3,7 @@ @title=News --> -## [JavaScript Lint 0.1f Released](http://www.javascriptlint.com/news/005) +## [JavaScript Lint 0.1f Released](__BASENAME__) _Sat, 10 Sep 2005 14:59:43 +0000_ This release adds a separate warning for nested statements that don't use curly braces (nested _if_, _for_, _while_, etc.), a warning for useless assignments (x = x), and a configuration option to enable option-explicit across all files. Modified: trunk/www/news/006 =================================================================== --- trunk/www/news/006 2009-10-07 19:39:23 UTC (rev 268) +++ trunk/www/news/006 2009-10-07 19:56:09 UTC (rev 269) @@ -3,7 +3,7 @@ @title=News --> -## [JavaScript Lint Source Package Available](http://www.javascriptlint.com/news/006) +## [JavaScript Lint Source Package Available](__BASENAME__) _Sat, 01 Oct 2005 17:06:22 +0000_ JavaScript Lint source is now [available for download](http://www.javascriptlint.com/download.htm) as a single package. Modified: trunk/www/news/007 =================================================================== --- trunk/www/news/007 2009-10-07 19:39:23 UTC (rev 268) +++ trunk/www/news/007 2009-10-07 19:56:09 UTC (rev 269) @@ -3,7 +3,7 @@ @title=News --> -## [JavaScript Lint 0.1g Released](http://www.javascriptlint.com/news/007) +## [JavaScript Lint 0.1g Released](__BASENAME__) _Sat, 08 Oct 2005 16:37:29 +0000_ This release includes a warning if the default case is missing from switch, a warning if a case is duplicated within a switch, better intelligence when checking for missing break statements, and a `/*@fallthru*@/` control comment (must always come at the very end of a case). Modified: trunk/www/news/008 =================================================================== --- trunk/www/news/008 2009-10-07 19:39:23 UTC (rev 268) +++ trunk/www/news/008 2009-10-07 19:56:09 UTC (rev 269) @@ -3,7 +3,7 @@ @title=News --> -## [JavaScript Lint 0.1h Released](http://www.javascriptlint.com/news/008) +## [JavaScript Lint 0.1h Released](__BASENAME__) _Tue, 25 Oct 2005 19:16:04 +0000_ This release upgrades the SpiderMonkey JavaScript engine from a release candidate to the latest stable branch (version 1.5). Modified: trunk/www/news/009 =================================================================== --- trunk/www/news/009 2009-10-07 19:39:23 UTC (rev 268) +++ trunk/www/news/009 2009-10-07 19:56:09 UTC (rev 269) @@ -3,7 +3,7 @@ @title=News --> -## [JavaScript Lint 0.1i Released](http://www.javascriptlint.com/news/009) +## [JavaScript Lint 0.1i Released](__BASENAME__) _Wed, 16 Nov 2005 14:28:54 +0000_ This release has a more specific warning for _else_ statements that may be intended for one of multiple _if_ statements (it previously warned that nested statements should use curly braces to resolve ambiguity): Modified: trunk/www/news/010 =================================================================== --- trunk/www/news/010 2009-10-07 19:39:23 UTC (rev 268) +++ trunk/www/news/010 2009-10-07 19:56:09 UTC (rev 269) @@ -3,7 +3,7 @@ @title=News --> -## [JavaScript Lint 0.1j Released](http://www.javascriptlint.com/news/010) +## [JavaScript Lint 0.1j Released](__BASENAME__) _Mon, 05 Dec 2005 20:19:35 +0000_ This release fixes a bug in the "duplicate case" warning for numbers. Certain numbers were incorrectly reported as duplicates. (This bug is more likely to affect JavaScript programmers using big-endian processors.) Modified: trunk/www/news/011 =================================================================== --- trunk/www/news/011 2009-10-07 19:39:23 UTC (rev 268) +++ trunk/www/news/011 2009-10-07 19:56:09 UTC (rev 269) @@ -3,7 +3,7 @@ @title=News --> -## [JavaScript Lint 0.1k Released](http://www.javascriptlint.com/news/011) +## [JavaScript Lint 0.1k Released](__BASENAME__) _Sat, 24 Dec 2005 18:56:35 +0000_ This release includes a number changes. Modified: trunk/www/news/012 =================================================================== --- trunk/www/news/012 2009-10-07 19:39:23 UTC (rev 268) +++ trunk/www/news/012 2009-10-07 19:56:09 UTC (rev 269) @@ -3,7 +3,7 @@ @title=News --> -## [JavaScript Lint 0.1l Released](http://www.javascriptlint.com/news/012) +## [JavaScript Lint 0.1l Released](__BASENAME__) _Mon, 02 Jan 2006 22:05:25 +0000_ This release includes a new warning for useless comparisons (for example, x == x). Modified: trunk/www/news/013 =================================================================== --- trunk/www/news/013 2009-10-07 19:39:23 UTC (rev 268) +++ trunk/www/news/013 2009-10-07 19:56:09 UTC (rev 269) @@ -3,7 +3,7 @@ @title=News --> -## [JavaScript Lint 0.1m Released](http://www.javascriptlint.com/news/013) +## [JavaScript Lint 0.1m Released](__BASENAME__) _Tue, 03 Jan 2006 17:31:25 +0000_ This release fixes a bug with the "undeclared identifier" warnings when using the import control comment. Modified: trunk/www/news/014 =================================================================== --- trunk/www/news/014 2009-10-07 19:39:23 UTC (rev 268) +++ trunk/www/news/014 2009-10-07 19:56:09 UTC (rev 269) @@ -3,7 +3,7 @@ @title=News --> -## [JavaScript Lint 0.2.0 Released](http://www.javascriptlint.com/news/014) +## [JavaScript Lint 0.2.0 Released](__BASENAME__) _Wed, 04 Jan 2006 02:20:01 +0000_ This release includes cumulative changes through version 0.1m. Modified: trunk/www/news/015 =================================================================== --- trunk/www/news/015 2009-10-07 19:39:23 UTC (rev 268) +++ trunk/www/news/015 2009-10-07 19:56:09 UTC (rev 269) @@ -3,7 +3,7 @@ @title=News --> -## [JavaScript Lint 0.2.1 Released](http://www.javascriptlint.com/news/015) +## [JavaScript Lint 0.2.1 Released](__BASENAME__) _Mon, 09 Jan 2006 14:18:24 +0000_ This release includes a configuration setting to completely disable legacy control comments. Modified: trunk/www/news/016 =================================================================== --- trunk/www/news/016 2009-10-07 19:39:23 UTC (rev 268) +++ trunk/www/news/016 2009-10-07 19:56:09 UTC (rev 269) @@ -3,7 +3,7 @@ @title=News --> -## [JavaScript Lint 0.2.2 Released](http://www.javascriptlint.com/news/016) +## [JavaScript Lint 0.2.2 Released](__BASENAME__) _Tue, 24 Jan 2006 14:16:24 +0000_ This release includes a __FILENAME__ keyword for the output format. Modified: trunk/www/news/017 =================================================================== --- trunk/www/news/017 2009-10-07 19:39:23 UTC (rev 268) +++ trunk/www/news/017 2009-10-07 19:56:09 UTC (rev 269) @@ -3,7 +3,7 @@ @title=News --> -## [JavaScript Lint 0.2.3 Released](http://www.javascriptlint.com/news/017) +## [JavaScript Lint 0.2.3 Released](__BASENAME__) _Thu, 16 Feb 2006 01:11:07 +0000_ Syntax errors in imported scripts were not being reported. Modified: trunk/www/news/018 =================================================================== --- trunk/www/news/018 2009-10-07 19:39:23 UTC (rev 268) +++ trunk/www/news/018 2009-10-07 19:56:09 UTC (rev 269) @@ -3,7 +3,7 @@ @title=News --> -## [JavaScript Lint 0.2.4 Released](http://www.javascriptlint.com/news/018) +## [JavaScript Lint 0.2.4 Released](__BASENAME__) _Sat, 11 Mar 2006 02:55:51 +0000_ JavaScript within HTML files can now contain `</script>` in string literals and comments. Modified: trunk/www/news/019 =================================================================== --- trunk/www/news/019 2009-10-07 19:39:23 UTC (rev 268) +++ trunk/www/news/019 2009-10-07 19:56:09 UTC (rev 269) @@ -3,7 +3,7 @@ @title=News --> -## [JavaScript Lint 0.2.5 Released](http://www.javascriptlint.com/news/019) +## [JavaScript Lint 0.2.5 Released](__BASENAME__) _Sat, 08 Apr 2006 04:29:38 +0000_ To facilitate integration into other applications, the output format can now be passed on the command line and the results can be encoded. The source package contains source files that can be used to easily [integrate JavaScript Lint into a Windows program](http://www.javascriptlint.com/docs/running_from_your_windows_program.htm). Modified: trunk/www/news/020 =================================================================== --- trunk/www/news/020 2009-10-07 19:39:23 UTC (rev 268) +++ trunk/www/news/020 2009-10-07 19:56:09 UTC (rev 269) @@ -3,7 +3,7 @@ @title=News --> -## [JavaScript Lint 0.2.6 Released](http://www.javascriptlint.com/news/020) +## [JavaScript Lint 0.2.6 Released](__BASENAME__) _Sat, 29 Apr 2006 15:07:13 +0000_ JavaScript Lint now has a `/*jsl:ignoreall*\` keyword to allow entire files to easily be ignored. Additionally, it no longer complains about blank JavaScript files. Modified: trunk/www/news/021 =================================================================== --- trunk/www/news/021 2009-10-07 19:39:23 UTC (rev 268) +++ trunk/www/news/021 2009-10-07 19:56:09 UTC (rev 269) @@ -3,7 +3,7 @@ @title=News --> -## [JavaScript Lint SourceForge Project](http://www.javascriptlint.com/news/021) +## [JavaScript Lint SourceForge Project](__BASENAME__) _Fri, 26 May 2006 05:15:10 +0000_ JavaScript Lint now has its own [SourceForge project](http://sourceforge.net/projects/javascriptlint) with [discussion forums](http://sourceforge.net/forum/?group_id=168518), [bug/feature trackers](http://sourceforge.net/tracker/?group_id=168518), and a publicly-available [Subversion repository](http://sourceforge.net/svn/?group_id=168518). Modified: trunk/www/news/022 =================================================================== --- trunk/www/news/022 2009-10-07 19:39:23 UTC (rev 268) +++ trunk/www/news/022 2009-10-07 19:56:09 UTC (rev 269) @@ -3,7 +3,7 @@ @title=News --> -## [JavaScript Lint 0.3.0 Released](http://www.javascriptlint.com/news/022) +## [JavaScript Lint 0.3.0 Released](__BASENAME__) _Fri, 03 Nov 2006 20:32:42 +0000_ This version has also been released for Intel Macs. Modified: trunk/www/news/023 =================================================================== --- trunk/www/news/023 2009-10-07 19:39:23 UTC (rev 268) +++ trunk/www/news/023 2009-10-07 19:56:09 UTC (rev 269) @@ -3,7 +3,7 @@ @title=News --> -## [IDE Integration](http://www.javascriptlint.com/news/023) +## [IDE Integration](__BASENAME__) _Sat, 29 Sep 2007 22:08:21 +0000_ The [documentation page](http://www.javascriptlint.com/docs/running_from_your_ide.htm) now contains instructions for integrating JavaScript Lint with TextMate, vim, and emacs. Modified: trunk/www/news/index.rss =================================================================== --- trunk/www/news/index.rss 2009-10-07 19:39:23 UTC (rev 268) +++ trunk/www/news/index.rss 2009-10-07 19:56:09 UTC (rev 269) @@ -3,6 +3,7 @@ @title=JavaScript Lint Project News @link=http://www.javascriptlint.com/ @desc=JavaScript Lint Project News +@linkbase=http://www.javascriptlint.com/news/ --> <!--@include index.htm--> Modified: trunk/www.py =================================================================== --- trunk/www.py 2009-10-07 19:39:23 UTC (rev 268) +++ trunk/www.py 2009-10-07 19:56:09 UTC (rev 269) @@ -62,7 +62,7 @@ def _remove_comments(source): return re.sub('<!--[^>]*-->', '', source) -def _gen_rss(source, title, link, desc): +def _gen_rss(source, title, link, desc, linkbase): def removeblanktextnodes(node): for i in range(len(node.childNodes)-1, -1, -1): child = node.childNodes[i] @@ -117,8 +117,16 @@ 'single text node.' heading = titlenode.value.strip() + # Combine the href with the linkbase. assert 'href' in link.attributes href = link.attribute_values['href'] + if '/' in href: + raise ValueError, 'The heading link should not reference ' + \ + 'directories: %s' % href + if not linkbase.endswith('/'): + raise ValueError, 'The @linkbase must be a directory: %s' % \ + linkbase + href = linkbase + href if href in guids: raise ValueError, "Duplicate link: %s" % href @@ -183,6 +191,7 @@ # The settings defined in the outer file will rule. settings = dict(re.findall(r'^@(\w+)=(.*)$', source, re.MULTILINE)) source = _remove_comments(source) + source = source.replace('__BASENAME__', os.path.basename(path)) return settings, source def _transform_file(path): @@ -197,7 +206,8 @@ settings, source = _preprocess(path) return 'text/xml', _gen_rss(source, settings.get('title'), settings.get('link'), - settings.get('desc')) + settings.get('desc'), + settings.get('linkbase')) elif path.endswith('.htm') or path.endswith('.php') or \ not '.' in os.path.basename(path): settings, source = _preprocess(path) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |