views:

28

answers:

2

I have an issue setting up an external tool in Visual Studio.

The tool is for JS Lint, which lints a javascript file.

My setup is as follows:

Title: &JSLint - http://www.jslint.com/

Command: C:\Users\XXXX\Documents\Visual Studio 2008\Tools\JsLint\jslint.cmd

Arguments: $(ItemPath)

Initial Directory: [blank]

When I run the tool, I get the following error in the output window:

Input Error: There is no file extension in "C:\Users\XXXX\Documents\Visual".

The issue I believe is with the space in the folder "Visual Studio 2008". If I change locations the a folder structure with no spaces in the name then all works fine. I would like to keep it in the "C:\Users\XXXX\Documents\Visual Studio 2008\Tools\JsLint\" folders though.

Can anyone help me out with this as to why it does not like the space in the folder names?

Looking at the .cmd windows command script in notepad, it contains the following - maybe I need to alter this to handle the space in the folder path - any ideas?

+1  A: 

Change arguments to this:

Arguments: "$(ItemPath)"
David Gladfelter
Thanks for help - tried this but still get the same error message.
Niall Collins
When I run out of ideas with a problem like this (getting an intermediate tool to pass the correct command line to a different tool) I usually just write a dead-simple C++ console application and have it spit out the command line it was given. Win32's GetCommandLine() function is handy since it doesn't parse the command line, unlike argv and argc. If that doesn't give me immediate insight into the true problem I then can quickly try out a bunch of different ideas until I hit upon the magic alt-shift-left-handbrake the intermediate tool wants.
David Gladfelter
+1, this is the correct answer.
Hans Passant
This is what is contained in the .cmd file, forgot to include in original question @cscript //nologo %~dp0\jslint.wsf %*Maybe its an issue here.Not sure how go about to integrate an intermediate tool - how do I go about this?
Niall Collins
A: 

I solved my issue by changing the cmd file from:

@cscript //nologo %~dp0\jslint.wsf %*

to:

@cscript //nologo "C:\Users\XXXX\Documents\Visual Studio 2008\Tools\JsLint\jslint.wsf" %*

Niall Collins