Revision: 207
http://javascriptlint.svn.sourceforge.net/javascriptlint/?rev=207&view=rev
Author: matthiasmiller
Date: 2008-08-22 13:24:53 +0000 (Fri, 22 Aug 2008)
Log Message:
-----------
#1625651: warn against -process and support --no-process
Modified Paths:
--------------
branches/cjsl/src/jsl.c
Modified: branches/cjsl/src/jsl.c
===================================================================
--- branches/cjsl/src/jsl.c 2008-08-15 19:53:49 UTC (rev 206)
+++ branches/cjsl/src/jsl.c 2008-08-22 13:24:53 UTC (rev 207)
@@ -1603,7 +1603,7 @@
fputc('\n', stdout);
PrintHeader();
fputs("Usage: jsl [-help:conf]\n"
- "\t[-conf filename] [-process filename] [+recurse|-recurse] [-stdin]\n"
+ "\t[-conf filename] [--process filename] [--no-process filename] [+recurse|-recurse] [-stdin]\n"
"\t[-nologo] [-nofilelisting] [-nocontext] [-nosummary] [-output-format ______]\n",
stdout);
#ifdef WIN32
@@ -2009,11 +2009,17 @@
configPath = argv[i];
}
- else if (strcasecmp(parm, "process") == 0) {
- /* TODO: -process is handled as +process" */
+ else if (strcasecmp(parm, "process") == 0 ||
+ (strcasecmp(parm, "no-process") == 0 && dashes == 2)) {
+ JSLPathAction action = tolower(*parm) == 'p' ? JSL_PATH_ACTION_ADD : JSL_PATH_ACTION_REMOVE;
+ if (dashes != 2) {
+ fprintf(stdout, "Error: -process is now ambiguous. Use --process or --no-process.");
+ result = usage();
+ goto cleanup;
+ }
if (++i < argc) {
char *err = NULL;
- if (!AddRelativePathToList(&scriptPaths, argv[i], JSL_PATH_ACTION_ADD, &err)) {
+ if (!AddRelativePathToList(&scriptPaths, argv[i], action, &err)) {
fprintf(stdout, "Error: %s\n", err);
JS_smprintf_free(err);
result = usage();
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|