Vim Tips Wiki
(→‎Suggested improvements: In which version?)
(adjust Template:ScriptComments to remove id as no longer needed; minor tweaks)
 
Line 1: Line 1:
{{ScriptComments|2630|jsl: compiler plugin for JavaScript Lint}}
+
{{ScriptComments|jsl: compiler plugin for JavaScript Lint}}
   
 
==Suggested improvements==
 
==Suggested improvements==

Latest revision as of 07:43, 15 November 2011

Use this page to discuss script 2630 jsl: compiler plugin for JavaScript Lint

  • Add constructive comments, bug reports, or discuss improvements (see the guideline).
  • Do not document the script here (the author should do that on vim.org).
  • This page may be out of date: check the script's vim.org page above, and its release notes.

Suggested improvements[]

Command line params are currently Windows-specific. Compiling javascript-lint on Linux gives slightly different command line syntax. Fix is as follows:

--- a/.vim/compiler/jsl.vim	Wed Feb 16 14:30:57 2011 +0000
+++ b/.vim/compiler/jsl.vim	Wed Feb 16 14:57:03 2011 +0000
@@ -43,7 +43,11 @@
     endif
     return (! empty(l:configFilespec) && filereadable(l:configFilespec) ? ' -conf "' . l:configFilespec . '"' : '')
 endfunction
-execute 'CompilerSet makeprg=jsl\ --nologo\ --nofilelisting\ --nosummary' .  escape(s:JslConfig(), ' "\') . '\ $*\ $*\ \"%\"'
+if has ('win32') || has ('win64')
+	execute 'CompilerSet makeprg=jsl\ -nologo\ -nofilelisting\ -nosummary' .  escape(s:JslConfig(), ' "\') . '\ $*\ -process\ $*\ \"%\"'
+else
+	execute 'CompilerSet makeprg=jsl\ --nologo\ --nofilelisting\ --nosummary' .  escape(s:JslConfig(), ' "\') . '\ $*\ $*\ \"%\"'
+endif
 unlet s:scriptDir
 
 " sample output:
Which version are you referring to? The latest available for download is 0.3.0, which seems to accept both - as well as -- arguments. -- Inkarkat 14:41, February 21, 2011 (UTC)
$ jsl

JavaScript Lint 0.3.0 (JavaScript-C 1.5 2004-09-24)
Developed by Matthias Miller (http://www.JavaScriptLint.com)

Usage: jsl [-help:conf]
        [-conf filename] [-process filename] [+recurse|-recurse] [-stdin]
        [-nologo] [-nofilelisting] [-nocontext] [-nosummary] [-output-format ______]

Comments[]