[javascriptlint-commit] SF.net SVN: javascriptlint:[267] trunk
Status: Beta
Brought to you by:
matthiasmiller
From: <mat...@us...> - 2009-10-07 19:32:12
|
Revision: 267 http://javascriptlint.svn.sourceforge.net/javascriptlint/?rev=267&view=rev Author: matthiasmiller Date: 2009-10-07 19:32:04 +0000 (Wed, 07 Oct 2009) Log Message: ----------- www: break news into separate items and implement RSS support Modified Paths: -------------- trunk/www/__template__ trunk/www/news.php trunk/www/rss.php trunk/www.py Added Paths: ----------- trunk/www/news/ 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.htm trunk/www/news.rss Modified: trunk/www/__template__ =================================================================== --- trunk/www/__template__ 2009-10-07 18:44:42 UTC (rev 266) +++ trunk/www/__template__ 2009-10-07 19:32:04 UTC (rev 267) @@ -10,7 +10,7 @@ <div id="nav"> %(nav)s - <p align="center"><br/><a href="/rss.php"> + <p align="center"><br/><a href="/news.rss"> <img border="0" src="/static/feed-icon-32x32.png" width="32" height="32"></a></p> <p align="center"><br/><a href="http://sourceforge.net/projects/javascriptlint"> Added: trunk/www/news/001 =================================================================== --- trunk/www/news/001 (rev 0) +++ trunk/www/news/001 2009-10-07 19:32:04 UTC (rev 267) @@ -0,0 +1,9 @@ +<!-- +@template=__template__ +@title=News +--> + +## [JavaScript Lint 0.1b Released](http://www.javascriptlint.com/news/001) +_Tue, 30 Aug 2005 15:37:08 +0000_ + +This release fixes a crash caused by certain syntax errors. For example: _if (a !=== b)_. Property changes on: trunk/www/news/001 ___________________________________________________________________ Added: svn:eol-style + native Added: trunk/www/news/002 =================================================================== --- trunk/www/news/002 (rev 0) +++ trunk/www/news/002 2009-10-07 19:32:04 UTC (rev 267) @@ -0,0 +1,9 @@ +<!-- +@template=__template__ +@title=News +--> + +## [JavaScript Lint 0.1c Released](http://www.javascriptlint.com/news/002) +_Tue, 30 Aug 2005 18:54:06 +0000_ + +This release corrects problems with the wildcard feature. Property changes on: trunk/www/news/002 ___________________________________________________________________ Added: svn:eol-style + native Added: trunk/www/news/003 =================================================================== --- trunk/www/news/003 (rev 0) +++ trunk/www/news/003 2009-10-07 19:32:04 UTC (rev 267) @@ -0,0 +1,9 @@ +<!-- +@template=__template__ +@title=News +--> + +## [JavaScript Lint 0.1d Released](http://www.javascriptlint.com/news/003) +_Tue, 30 Aug 2005 22:28:35 +0000_ + +This release fixes a crash caused by an incorrectly formed control comment. Property changes on: trunk/www/news/003 ___________________________________________________________________ Added: svn:eol-style + native Added: trunk/www/news/004 =================================================================== --- trunk/www/news/004 (rev 0) +++ trunk/www/news/004 2009-10-07 19:32:04 UTC (rev 267) @@ -0,0 +1,11 @@ +<!-- +@template=__template__ +@title=News +--> + +## [JavaScript Lint 0.1e Released](http://www.javascriptlint.com/news/004) +_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.) + + Property changes on: trunk/www/news/004 ___________________________________________________________________ Added: svn:eol-style + native Added: trunk/www/news/005 =================================================================== --- trunk/www/news/005 (rev 0) +++ trunk/www/news/005 2009-10-07 19:32:04 UTC (rev 267) @@ -0,0 +1,11 @@ +<!-- +@template=__template__ +@title=News +--> + +## [JavaScript Lint 0.1f Released](http://www.javascriptlint.com/news/005) +_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. + + Property changes on: trunk/www/news/005 ___________________________________________________________________ Added: svn:eol-style + native Added: trunk/www/news/006 =================================================================== --- trunk/www/news/006 (rev 0) +++ trunk/www/news/006 2009-10-07 19:32:04 UTC (rev 267) @@ -0,0 +1,11 @@ +<!-- +@template=__template__ +@title=News +--> + +## [JavaScript Lint Source Package Available](http://www.javascriptlint.com/news/006) +_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. + + Property changes on: trunk/www/news/006 ___________________________________________________________________ Added: svn:eol-style + native Added: trunk/www/news/007 =================================================================== --- trunk/www/news/007 (rev 0) +++ trunk/www/news/007 2009-10-07 19:32:04 UTC (rev 267) @@ -0,0 +1,13 @@ +<!-- +@template=__template__ +@title=News +--> + +## [JavaScript Lint 0.1g Released](http://www.javascriptlint.com/news/007) +_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). + +Available from the [download page](http://www.javascriptlint.com/download.htm). + + Property changes on: trunk/www/news/007 ___________________________________________________________________ Added: svn:eol-style + native Added: trunk/www/news/008 =================================================================== --- trunk/www/news/008 (rev 0) +++ trunk/www/news/008 2009-10-07 19:32:04 UTC (rev 267) @@ -0,0 +1,12 @@ +<!-- +@template=__template__ +@title=News +--> + +## [JavaScript Lint 0.1h Released](http://www.javascriptlint.com/news/008) +_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). +Available from the [download page](http://www.javascriptlint.com/download.htm). + + Property changes on: trunk/www/news/008 ___________________________________________________________________ Added: svn:eol-style + native Added: trunk/www/news/009 =================================================================== --- trunk/www/news/009 (rev 0) +++ trunk/www/news/009 2009-10-07 19:32:04 UTC (rev 267) @@ -0,0 +1,22 @@ +<!-- +@template=__template__ +@title=News +--> + +## [JavaScript Lint 0.1i Released](http://www.javascriptlint.com/news/009) +_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): + +> + `if (i)` + `if (j) func1();` + `else func2();` + +The warning against duplicate case statements now correctly handles case statements with string literals. + +This release fixes a bug that caused a "Bus error" on Mac OS X and a segmentation fault on Solaris 5.9; JavaScript Lint has now been compiled and run on those operating systems. If Mac users are interested in precompiled binaries, I will consider making them available for download on the website. + +Available from the [download page](http://www.javascriptlint.com/download.htm). + + Property changes on: trunk/www/news/009 ___________________________________________________________________ Added: svn:eol-style + native Added: trunk/www/news/010 =================================================================== --- trunk/www/news/010 (rev 0) +++ trunk/www/news/010 2009-10-07 19:32:04 UTC (rev 267) @@ -0,0 +1,15 @@ +<!-- +@template=__template__ +@title=News +--> + +## [JavaScript Lint 0.1j Released](http://www.javascriptlint.com/news/010) +_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.) + +The [Online Lint](http://www.javascriptlint.com/online_lint.php) has also been updated to use a local CGI, making the script much more responsive. PHP source code for the Online Lint is included in the source package. + +Available from the [download page](http://www.javascriptlint.com/download.htm). + + Property changes on: trunk/www/news/010 ___________________________________________________________________ Added: svn:eol-style + native Added: trunk/www/news/011 =================================================================== --- trunk/www/news/011 (rev 0) +++ trunk/www/news/011 2009-10-07 19:32:04 UTC (rev 267) @@ -0,0 +1,42 @@ +<!-- +@template=__template__ +@title=News +--> + +## [JavaScript Lint 0.1k Released](http://www.javascriptlint.com/news/011) +_Sat, 24 Dec 2005 18:56:35 +0000_ + +This release includes a number changes. + +__Enhancements:__ + +* JavaScript Lint warns if the default case is not at the end of the switch statement. + +* Control comments can now use the `/*jsl:keyword*/` syntax in addition to the `/*@keyword@*/` syntax. The new syntax is recommended for interoperability with JScript conditional compilation, although the traditional syntax is still supported. + +* The "missing break" warning can be disabled for the last case in a switch statement. The presence of this _break_ is merely stylistic preference. + +* The "missing semicolon" warning can be disabled when anonymous functions are assigned to variables and properties (such as function prototypes). Code such as the following can optionally be allowed: + +> + function Coord() { + this.x = function() { + return 1; + } + } + Coord.prototype.y = function() { + return 0; + } + +__Bug Fixes:__ + +* The "undeclared identifier" warning for variables has been updated to reflect the ECMA specification. The following code no longer issues a warning: + > + function getX() { return x; } + var x; + +* Scripts with circular _import_ directives no longer incorrectly report undeclared identifiers. + +Available from the [download page](http://www.javascriptlint.com/download.htm). + + Property changes on: trunk/www/news/011 ___________________________________________________________________ Added: svn:eol-style + native Added: trunk/www/news/012 =================================================================== --- trunk/www/news/012 (rev 0) +++ trunk/www/news/012 2009-10-07 19:32:04 UTC (rev 267) @@ -0,0 +1,15 @@ +<!-- +@template=__template__ +@title=News +--> + +## [JavaScript Lint 0.1l Released](http://www.javascriptlint.com/news/012) +_Mon, 02 Jan 2006 22:05:25 +0000_ + +This release includes a new warning for useless comparisons (for example, x == x). + +This release also improves the use of the _fallthru_ control comment when used in the final case in a switch statement. The "undeclared identifier" fix in the 0.1k release is now applied to both global and local variables declarations. + +Available from the [download page](http://www.javascriptlint.com/download.htm). + + Property changes on: trunk/www/news/012 ___________________________________________________________________ Added: svn:eol-style + native Added: trunk/www/news/013 =================================================================== --- trunk/www/news/013 (rev 0) +++ trunk/www/news/013 2009-10-07 19:32:04 UTC (rev 267) @@ -0,0 +1,13 @@ +<!-- +@template=__template__ +@title=News +--> + +## [JavaScript Lint 0.1m Released](http://www.javascriptlint.com/news/013) +_Tue, 03 Jan 2006 17:31:25 +0000_ + +This release fixes a bug with the "undeclared identifier" warnings when using the import control comment. + +Available from the [download page](http://www.javascriptlint.com/download.htm). + + Property changes on: trunk/www/news/013 ___________________________________________________________________ Added: svn:eol-style + native Added: trunk/www/news/014 =================================================================== --- trunk/www/news/014 (rev 0) +++ trunk/www/news/014 2009-10-07 19:32:04 UTC (rev 267) @@ -0,0 +1,15 @@ +<!-- +@template=__template__ +@title=News +--> + +## [JavaScript Lint 0.2.0 Released](http://www.javascriptlint.com/news/014) +_Wed, 04 Jan 2006 02:20:01 +0000_ + +This release includes cumulative changes through version 0.1m. + +This release has a command-line parameter to disable the file listing in the output. + +Available from the [download page](http://www.javascriptlint.com/download.htm). + + Property changes on: trunk/www/news/014 ___________________________________________________________________ Added: svn:eol-style + native Added: trunk/www/news/015 =================================================================== --- trunk/www/news/015 (rev 0) +++ trunk/www/news/015 2009-10-07 19:32:04 UTC (rev 267) @@ -0,0 +1,13 @@ +<!-- +@template=__template__ +@title=News +--> + +## [JavaScript Lint 0.2.1 Released](http://www.javascriptlint.com/news/015) +_Mon, 09 Jan 2006 14:18:24 +0000_ + +This release includes a configuration setting to completely disable legacy control comments. + +Available from the [download page](http://www.javascriptlint.com/download.htm). + + Property changes on: trunk/www/news/015 ___________________________________________________________________ Added: svn:eol-style + native Added: trunk/www/news/016 =================================================================== --- trunk/www/news/016 (rev 0) +++ trunk/www/news/016 2009-10-07 19:32:04 UTC (rev 267) @@ -0,0 +1,13 @@ +<!-- +@template=__template__ +@title=News +--> + +## [JavaScript Lint 0.2.2 Released](http://www.javascriptlint.com/news/016) +_Tue, 24 Jan 2006 14:16:24 +0000_ + +This release includes a __FILENAME__ keyword for the output format. + +Available from the [download page](http://www.javascriptlint.com/download.htm). + + Property changes on: trunk/www/news/016 ___________________________________________________________________ Added: svn:eol-style + native Added: trunk/www/news/017 =================================================================== --- trunk/www/news/017 (rev 0) +++ trunk/www/news/017 2009-10-07 19:32:04 UTC (rev 267) @@ -0,0 +1,12 @@ +<!-- +@template=__template__ +@title=News +--> + +## [JavaScript Lint 0.2.3 Released](http://www.javascriptlint.com/news/017) +_Thu, 16 Feb 2006 01:11:07 +0000_ + +Syntax errors in imported scripts were not being reported. +Available from the [download page](http://www.javascriptlint.com/download.htm). + + Property changes on: trunk/www/news/017 ___________________________________________________________________ Added: svn:eol-style + native Added: trunk/www/news/018 =================================================================== --- trunk/www/news/018 (rev 0) +++ trunk/www/news/018 2009-10-07 19:32:04 UTC (rev 267) @@ -0,0 +1,17 @@ +<!-- +@template=__template__ +@title=News +--> + +## [JavaScript Lint 0.2.4 Released](http://www.javascriptlint.com/news/018) +_Sat, 11 Mar 2006 02:55:51 +0000_ + +JavaScript within HTML files can now contain `</script>` in string literals and comments. + +When referencing an external script, the _script_ start and end tags no longer need to be on the same line. + +JavaScript files using "Unicode (UTF-8 with signature) - Codepage 65001" encoding, such as those created in Microsoft Visual Studio, no longer generate errors. + +Available from the [download page](http://www.javascriptlint.com/download.htm). + + Property changes on: trunk/www/news/018 ___________________________________________________________________ Added: svn:eol-style + native Added: trunk/www/news/019 =================================================================== --- trunk/www/news/019 (rev 0) +++ trunk/www/news/019 2009-10-07 19:32:04 UTC (rev 267) @@ -0,0 +1,17 @@ +<!-- +@template=__template__ +@title=News +--> + +## [JavaScript Lint 0.2.5 Released](http://www.javascriptlint.com/news/019) +_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). + +The [documentation](http://www.javascriptlint.com/docs/) on the website has been updated. + +The "Unicode (UTF-8 with signature) - Codepage 65001" encoding is now supported for configuration files. + +Available from the [download page](http://www.javascriptlint.com/download.htm). + + Property changes on: trunk/www/news/019 ___________________________________________________________________ Added: svn:eol-style + native Added: trunk/www/news/020 =================================================================== --- trunk/www/news/020 (rev 0) +++ trunk/www/news/020 2009-10-07 19:32:04 UTC (rev 267) @@ -0,0 +1,11 @@ +<!-- +@template=__template__ +@title=News +--> + +## [JavaScript Lint 0.2.6 Released](http://www.javascriptlint.com/news/020) +_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. + +Available from the [download page](http://www.javascriptlint.com/download.htm). Property changes on: trunk/www/news/020 ___________________________________________________________________ Added: svn:eol-style + native Added: trunk/www/news/021 =================================================================== --- trunk/www/news/021 (rev 0) +++ trunk/www/news/021 2009-10-07 19:32:04 UTC (rev 267) @@ -0,0 +1,9 @@ +<!-- +@template=__template__ +@title=News +--> + +## [JavaScript Lint SourceForge Project](http://www.javascriptlint.com/news/021) +_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). Property changes on: trunk/www/news/021 ___________________________________________________________________ Added: svn:eol-style + native Added: trunk/www/news/022 =================================================================== --- trunk/www/news/022 (rev 0) +++ trunk/www/news/022 2009-10-07 19:32:04 UTC (rev 267) @@ -0,0 +1,30 @@ +<!-- +@template=__template__ +@title=News +--> + +## [JavaScript Lint 0.3.0 Released](http://www.javascriptlint.com/news/022) +_Fri, 03 Nov 2006 20:32:42 +0000_ + +This version has also been released for Intel Macs. + +__Enhancements:__ + +* Add support for JScript's function extensions, such as `function window.onload() {}` and `function window::onload()`. (This is disabled by default.) +* Add a `/*jsl:pass*/` control comment to suppress warnings about empty statementss. +* Add a `/*jsl:declare*/` control comment to suppress warnings about undeclared identifiers. +* Warn against trailing comments in array initializers. +* Warn against assignments to function calls (for example, `alert() = 10`). +* Warn against calls to `parseInt` without a radix parameter. +* Warn against implicit type conversion when comparing against `true` or `false`. +* Clarify the warning against `with` statements. + +__Bug Fixes:__ + +* Fix syntax error on nested comments. +* Fix duplicate case warning. +* Fix insuppressible increment/decrement warning. +* Fix incorrect warning against invalid `/*jsl:fallthru*/` comment. +* Fix undeclared identifiers in `with` statements. + +_Update:_ Corrected post title. Property changes on: trunk/www/news/022 ___________________________________________________________________ Added: svn:eol-style + native Added: trunk/www/news/023 =================================================================== --- trunk/www/news/023 (rev 0) +++ trunk/www/news/023 2009-10-07 19:32:04 UTC (rev 267) @@ -0,0 +1,11 @@ +<!-- +@template=__template__ +@title=News +--> + +## [IDE Integration](http://www.javascriptlint.com/news/023) +_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. + +Improvements to the documentation are welcome. Property changes on: trunk/www/news/023 ___________________________________________________________________ Added: svn:eol-style + native Added: trunk/www/news/index.htm =================================================================== --- trunk/www/news/index.htm (rev 0) +++ trunk/www/news/index.htm 2009-10-07 19:32:04 UTC (rev 267) @@ -0,0 +1,31 @@ +<!-- +@template=__template__ +@title=News +--> + +Project News +============ + +<!--@include 022--> +<!--@include 021--> +<!--@include 020--> +<!--@include 019--> +<!--@include 018--> +<!--@include 017--> +<!--@include 016--> +<!--@include 015--> +<!--@include 014--> +<!--@include 013--> +<!--@include 012--> +<!--@include 011--> +<!--@include 010--> +<!--@include 009--> +<!--@include 008--> +<!--@include 007--> +<!--@include 006--> +<!--@include 005--> +<!--@include 004--> +<!--@include 003--> +<!--@include 002--> +<!--@include 001--> + Property changes on: trunk/www/news/index.htm ___________________________________________________________________ Added: svn:eol-style + native Modified: trunk/www/news.php =================================================================== --- trunk/www/news.php 2009-10-07 18:44:42 UTC (rev 266) +++ trunk/www/news.php 2009-10-07 19:32:04 UTC (rev 267) @@ -1,247 +1,3 @@ -<!-- -@template=__template__ -@title=News ---> - -Project News -============ - -## [IDE Integration](http://www.javascriptlint.com/news.php?id=23) -_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. - -Improvements to the documentation are welcome. - - -## [JavaScript Lint 0.3.0 Released](http://www.javascriptlint.com/news.php?id=22) -_Fri, 03 Nov 2006 20:32:42 +0000_ - -This version has also been released for Intel Macs. - -__Enhancements:__ - -* Add support for JScript's function extensions, such as `function window.onload() {}` and `function window::onload()`. (This is disabled by default.) -* Add a `/*jsl:pass*/` control comment to suppress warnings about empty statementss. -* Add a `/*jsl:declare*/` control comment to suppress warnings about undeclared identifiers. -* Warn against trailing comments in array initializers. -* Warn against assignments to function calls (for example, `alert() = 10`). -* Warn against calls to `parseInt` without a radix parameter. -* Warn against implicit type conversion when comparing against `true` or `false`. -* Clarify the warning against `with` statements. - -__Bug Fixes:__ - -* Fix syntax error on nested comments. -* Fix duplicate case warning. -* Fix insuppressible increment/decrement warning. -* Fix incorrect warning against invalid `/*jsl:fallthru*/` comment. -* Fix undeclared identifiers in `with` statements. - -_Update:_ Corrected post title. - - -## [JavaScript Lint SourceForge Project](http://www.javascriptlint.com/news.php?id=21) -_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). - - -## [JavaScript Lint 0.2.6 Released](http://www.javascriptlint.com/news.php?id=20) -_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. - -Available from the [download page](http://www.javascriptlint.com/download.htm). - - -## [JavaScript Lint 0.2.5 Released](http://www.javascriptlint.com/news.php?id=19) -_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). - -The [documentation](http://www.javascriptlint.com/docs/) on the website has been updated. - -The "Unicode (UTF-8 with signature) - Codepage 65001" encoding is now supported for configuration files. - -Available from the [download page](http://www.javascriptlint.com/download.htm). - - -## [JavaScript Lint 0.2.4 Released](http://www.javascriptlint.com/news.php?id=18) -_Sat, 11 Mar 2006 02:55:51 +0000_ - -JavaScript within HTML files can now contain `</script>` in string literals and comments. - -When referencing an external script, the _script_ start and end tags no longer need to be on the same line. - -JavaScript files using "Unicode (UTF-8 with signature) - Codepage 65001" encoding, such as those created in Microsoft Visual Studio, no longer generate errors. - -Available from the [download page](http://www.javascriptlint.com/download.htm). - - -## [JavaScript Lint 0.2.3 Released](http://www.javascriptlint.com/news.php?id=17) -_Thu, 16 Feb 2006 01:11:07 +0000_ - -Syntax errors in imported scripts were not being reported. -Available from the [download page](http://www.javascriptlint.com/download.htm). - - -## [JavaScript Lint 0.2.2 Released](http://www.javascriptlint.com/news.php?id=16) -_Tue, 24 Jan 2006 14:16:24 +0000_ - -This release includes a __FILENAME__ keyword for the output format. - -Available from the [download page](http://www.javascriptlint.com/download.htm). - - -## [JavaScript Lint 0.2.1 Released](http://www.javascriptlint.com/news.php?id=15) -_Mon, 09 Jan 2006 14:18:24 +0000_ - -This release includes a configuration setting to completely disable legacy control comments. - -Available from the [download page](http://www.javascriptlint.com/download.htm). - - -## [JavaScript Lint 0.2.0 Released](http://www.javascriptlint.com/news.php?id=14) -_Wed, 04 Jan 2006 02:20:01 +0000_ - -This release includes cumulative changes through version 0.1m. - -This release has a command-line parameter to disable the file listing in the output. - -Available from the [download page](http://www.javascriptlint.com/download.htm). - - -## [JavaScript Lint 0.1m Released](http://www.javascriptlint.com/news.php?id=13) -_Tue, 03 Jan 2006 17:31:25 +0000_ - -This release fixes a bug with the "undeclared identifier" warnings when using the import control comment. - -Available from the [download page](http://www.javascriptlint.com/download.htm). - - -## [JavaScript Lint 0.1l Released](http://www.javascriptlint.com/news.php?id=12) -_Mon, 02 Jan 2006 22:05:25 +0000_ - -This release includes a new warning for useless comparisons (for example, x == x). - -This release also improves the use of the _fallthru_ control comment when used in the final case in a switch statement. The "undeclared identifier" fix in the 0.1k release is now applied to both global and local variables declarations. - -Available from the [download page](http://www.javascriptlint.com/download.htm). - - -## [JavaScript Lint 0.1k Released](http://www.javascriptlint.com/news.php?id=11) -_Sat, 24 Dec 2005 18:56:35 +0000_ - -This release includes a number changes. - -__Enhancements:__ - -* JavaScript Lint warns if the default case is not at the end of the switch statement. - -* Control comments can now use the `/*jsl:keyword*/` syntax in addition to the `/*@keyword@*/` syntax. The new syntax is recommended for interoperability with JScript conditional compilation, although the traditional syntax is still supported. - -* The "missing break" warning can be disabled for the last case in a switch statement. The presence of this _break_ is merely stylistic preference. - -* The "missing semicolon" warning can be disabled when anonymous functions are assigned to variables and properties (such as function prototypes). Code such as the following can optionally be allowed: - -> - function Coord() { - this.x = function() { - return 1; - } - } - Coord.prototype.y = function() { - return 0; - } - -__Bug Fixes:__ - -* The "undeclared identifier" warning for variables has been updated to reflect the ECMA specification. The following code no longer issues a warning: - > - function getX() { return x; } - var x; - -* Scripts with circular _import_ directives no longer incorrectly report undeclared identifiers. - -Available from the [download page](http://www.javascriptlint.com/download.htm). - - -## [JavaScript Lint 0.1j Released](http://www.javascriptlint.com/news.php?id=10) -_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.) - -The [Online Lint](http://www.javascriptlint.com/online_lint.php) has also been updated to use a local CGI, making the script much more responsive. PHP source code for the Online Lint is included in the source package. - -Available from the [download page](http://www.javascriptlint.com/download.htm). - - -## [JavaScript Lint 0.1i Released](http://www.javascriptlint.com/news.php?id=9) -_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): - -> - `if (i)` - `if (j) func1();` - `else func2();` - -The warning against duplicate case statements now correctly handles case statements with string literals. - -This release fixes a bug that caused a "Bus error" on Mac OS X and a segmentation fault on Solaris 5.9; JavaScript Lint has now been compiled and run on those operating systems. If Mac users are interested in precompiled binaries, I will consider making them available for download on the website. - -Available from the [download page](http://www.javascriptlint.com/download.htm). - - -## [JavaScript Lint 0.1h Released](http://www.javascriptlint.com/news.php?id=8) -_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). -Available from the [download page](http://www.javascriptlint.com/download.htm). - - -## [JavaScript Lint 0.1g Released](http://www.javascriptlint.com/news.php?id=7) -_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). - -Available from the [download page](http://www.javascriptlint.com/download.htm). - - -## [JavaScript Lint Source Package Available](http://www.javascriptlint.com/news.php?id=6) -_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. - - -## [JavaScript Lint 0.1f Released](http://www.javascriptlint.com/download.htm) -_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. - - -## [JavaScript Lint 0.1e Released](http://www.javascriptlint.com/download.htm) -_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.) - - -## [JavaScript Lint 0.1d Released](http://www.javascriptlint.com/download.htm) -_Tue, 30 Aug 2005 22:28:35 +0000_ - -This release fixes a crash caused by an incorrectly formed control comment. - - -## [JavaScript Lint 0.1c Released](http://www.javascriptlint.com/download.htm) -_Tue, 30 Aug 2005 18:54:06 +0000_ - -This release corrects problems with the wildcard feature. - - -## [JavaScript Lint 0.1b Released](http://www.javascriptlint.com/download.htm) -_Tue, 30 Aug 2005 15:37:08 +0000_ - -This release fixes a crash caused by certain syntax errors. For example: _if (a !=== b)_. - - +<?php +// ?: Header("Location: /news/" . str_pad(int($_GET['id']), 3, "0")); +?> Added: trunk/www/news.rss =================================================================== --- trunk/www/news.rss (rev 0) +++ trunk/www/news.rss 2009-10-07 19:32:04 UTC (rev 267) @@ -0,0 +1,8 @@ +<!-- +@output=rss +@title=JavaScript Lint Project News +@link=http://www.javascriptlint.com/ +@desc=JavaScript Lint Project News +--> + +<!--@include /news/--> Property changes on: trunk/www/news.rss ___________________________________________________________________ Added: svn:eol-style + native Modified: trunk/www/rss.php =================================================================== --- trunk/www/rss.php 2009-10-07 18:44:42 UTC (rev 266) +++ trunk/www/rss.php 2009-10-07 19:32:04 UTC (rev 267) @@ -0,0 +1,3 @@ +<?php +// Header('Location: /news.rss'); +?> Modified: trunk/www.py =================================================================== --- trunk/www.py 2009-10-07 18:44:42 UTC (rev 266) +++ trunk/www.py 2009-10-07 19:32:04 UTC (rev 267) @@ -1,6 +1,7 @@ #!/usr/bin/python # vim: ts=4 sw=4 expandtab import BaseHTTPServer +import md5 import re import os import sys @@ -15,30 +16,169 @@ ('/download.htm', 'Download'), ('/online_lint.php', 'The Online Lint'), ('/docs/', 'Documentation'), - ('/news.php', 'News'), + ('/news/', 'News'), ('/contact_support.htm', 'Contact'), ] -def _resolve_url(url): +def _markdown2doc(source): + class _PostProcessor(markdown.Postprocessor): + def run(self, doc): + self.doc = doc + return doc + postprocessor = _PostProcessor() + md = markdown.Markdown() + md.postprocessors.append(postprocessor) + md.convert(source) + return postprocessor.doc + +def _resolve_url(url, parentpath): + root = DOC_ROOT + if not url.startswith('/'): + if parentpath: + root = os.path.dirname(parentpath) + assert (root + os.sep).startswith(DOC_ROOT + os.sep) + else: + raise ValueError, 'Tried resolving relative URL: %s' % url + urls = [ url.rstrip('/') + '/index.htm', url ] for url in urls: - path = os.path.join(DOC_ROOT, url.lstrip('/')) - if path.startswith(DOC_ROOT + os.sep) and os.path.isfile(path): + path = os.path.join(root, url.lstrip('/')) + if path.startswith(root + os.sep) and os.path.isfile(path): return path def _get_nav(path): nav = [] for url, name in NAV: - navpath = _resolve_url(url) + navpath = _resolve_url(url, None) if navpath and navpath == path: nav.append('* <a class="active">%s</a>' % name) else: nav.append('* [%s](%s)' % (name, url)) return markdown.markdown('\n'.join(nav)) +def _remove_comments(source): + return re.sub('<!--[^>]*-->', '', source) + +def _gen_rss(source, title, link, desc): + def removeblanktextnodes(node): + for i in range(len(node.childNodes)-1, -1, -1): + child = node.childNodes[i] + if child.type == 'text': + if not child.value: + node.removeChild(child) + else: + removeblanktextnodes(child) + text = _remove_comments(source) + doc = _markdown2doc(text) + + oldDocElement = doc.documentElement + removeblanktextnodes(oldDocElement) + + rss = doc.createElement("rss") + rss.setAttribute('version', '2.0') + doc.appendChild(rss) + + channel = doc.createElement("channel") + rss.appendChild(channel) + if not title: + raise ValueError, 'Missing @title= setting.' + if not link: + raise ValueError, 'Missing @link= setting.' + if not desc: + raise ValueError, 'Missing @desc= setting.' + channel.appendChild(doc.createElement('title', textNode=title)) + channel.appendChild(doc.createElement('link', textNode=link)) + channel.appendChild(doc.createElement('desc', textNode=desc)) + + guids = [] + + item = None + item_desc = None + + for child in oldDocElement.childNodes: + if child.type != "element": + if child.value.strip(): + raise ValueError, 'Expected outer-level element, not text.' + continue + + if child.nodeName == 'h1': + pass + elif child.nodeName == "h2": + link = len(child.childNodes) == 1 and child.childNodes[0] + if not link or link.type != 'element' or link.nodeName != 'a': + raise ValueError, 'Each heading must be a link.' + + titlenode = len(link.childNodes) == 1 and link.childNodes[0] + if not titlenode or titlenode.type != 'text': + raise ValueError, 'Each heading link must contain a ' + \ + 'single text node.' + heading = titlenode.value.strip() + + assert 'href' in link.attributes + href = link.attribute_values['href'] + + if href in guids: + raise ValueError, "Duplicate link: %s" % href + guids.append(href) + + item = doc.createElement("item") + channel.appendChild(item) + item.appendChild(doc.createElement("link", href)) + item.appendChild(doc.createElement("title", heading)) + item.appendChild(doc.createElement("guid", guid)) + item_desc = None + + elif child.nodeName in ["p", "ul", "blockquote"] : + if not item_desc: + # The first paragraph is <p><em>pubDate</em></p> + em = len(child.childNodes) == 1 and child.childNodes[0] + if not em or em.type != 'element' or em.nodeName != 'em': + raise ValueError, 'The first paragraph must contain ' + \ + 'only an <em>.' + + emchild = len(em.childNodes) == 1 and em.childNodes[0] + if not emchild or emchild.type != 'text': + raise ValueError, "The first paragraph's em must " + \ + "contain only text." + + # TODO: Validate canonical date format. + + item.appendChild(doc.createElement('pubDate', emchild.value)) + item_desc = doc.createElement("description") + item.appendChild(item_desc) + else: + cdata = doc.createCDATA(child.toxml()) + item_desc.appendChild(cdata) + + else: + raise ValueError, 'Unsupported node type: %s' % child.nodeName + return doc.toxml() + +def _preprocess(path): + def _include(match): + # When including a file, update global settings and replace + # with contents. + includepath = _resolve_url(match.group(1).strip(), path) + if not includepath: + raise ValueError, 'Unmatched URL: %s' % match.group(1) + settings, contents = _preprocess(includepath) + childsettings.update(settings) + return contents + + source = open(path).read() + + # Process includes. + childsettings = {} + source = re.sub('<!--@include ([^>]*)-->', _include, source) + + # The settings defined in the outer file will rule. + settings = dict(re.findall(r'^@(\w+)=(.*)$', source, re.MULTILINE)) + source = _remove_comments(source) + return settings, source + def _transform_file(path): source = open(path).read() if path.endswith('.css'): @@ -47,9 +187,14 @@ return 'image/gif', source elif path.endswith('.png'): return 'image/png', source - elif path.endswith('.htm') or path.endswith('.php'): - settings = dict(re.findall(r'^@(\w+)=(.*)$', source, re.MULTILINE)) - + elif path.endswith('.rss'): + settings, source = _preprocess(path) + return 'text/xml', _gen_rss(source, settings.get('title'), + settings.get('link'), + settings.get('desc')) + elif path.endswith('.htm') or path.endswith('.php') or \ + not '.' in os.path.basename(path): + settings, source = _preprocess(path) page = markdown.markdown(source) if 'template' in settings: # TODO: encode keywords @@ -65,7 +210,7 @@ class _Handler(BaseHTTPServer.BaseHTTPRequestHandler): def do_GET(self): - path = _resolve_url(self.path) + path = _resolve_url(self.path, None) if path: try: self._send_response(*_transform_file(path)) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |