[javascriptlint-commit] SF.net SVN: javascriptlint:[241] trunk
Status: Beta
Brought to you by:
matthiasmiller
From: <mat...@us...> - 2009-03-04 06:52:40
|
Revision: 241 http://javascriptlint.svn.sourceforge.net/javascriptlint/?rev=241&view=rev Author: matthiasmiller Date: 2009-03-04 06:52:38 +0000 (Wed, 04 Mar 2009) Log Message: ----------- fix exception when importing a path using backslashes on a Unix environment Modified Paths: -------------- trunk/pyjsl/lint.py Added Paths: ----------- trunk/tests/control_comments/import-slashes.js Modified: trunk/pyjsl/lint.py =================================================================== --- trunk/pyjsl/lint.py 2009-03-04 06:47:42 UTC (rev 240) +++ trunk/pyjsl/lint.py 2009-03-04 06:52:38 UTC (rev 241) @@ -206,6 +206,9 @@ def lint_files(paths, lint_error, conf=conf.Conf()): def lint_file(path, kind): def import_script(import_path): + # The user can specify paths using backslashes (such as when + # linting Windows scripts on a posix environment. + import_path = import_path.replace('\\', os.sep) import_path = os.path.join(os.path.dirname(path), import_path) return lint_file(import_path, 'js') def _lint_error(*args): Added: trunk/tests/control_comments/import-slashes.js =================================================================== --- trunk/tests/control_comments/import-slashes.js (rev 0) +++ trunk/tests/control_comments/import-slashes.js 2009-03-04 06:52:38 UTC (rev 241) @@ -0,0 +1,5 @@ +/*jsl:option explicit*/ + +/* Try importing using backslashes instead of forward slashes. */ +/*jsl:import ..\control_comments\import-slashes.js */ + Property changes on: trunk/tests/control_comments/import-slashes.js ___________________________________________________________________ Added: svn:eol-style + native This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |