From ed135a235025088a51d6bf74359baa8512dbef11 Mon Sep 17 00:00:00 2001 From: Isaac Hier Date: Sun, 5 Jan 2014 02:38:23 -0500 Subject: [PATCH 1/2] Change lint so that process only exits on failure. --- lib/yuidoc.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/yuidoc.js b/lib/yuidoc.js index dd12912d..3e4001c6 100755 --- a/lib/yuidoc.js +++ b/lib/yuidoc.js @@ -305,8 +305,8 @@ YUI.add('yuidoc', function(Y) { count++; console.log('#' + count, item.message, item.line + '\n'); }); + process.exit(code); } - process.exit(code); }, /** * Process the config, walk the file tree and write out the JSON data. From 97f108eac67f2571a264d644a40b8b402d4a9013 Mon Sep 17 00:00:00 2001 From: Isaac Hier Date: Sun, 5 Jan 2014 13:23:49 -0500 Subject: [PATCH 2/2] Modify linting: Successful lint exits the CLI, unsuccessful lint exits the process. --- lib/cli.js | 3 +++ lib/yuidoc.js | 1 + 2 files changed, 4 insertions(+) diff --git a/lib/cli.js b/lib/cli.js index df157f58..f6d63d82 100755 --- a/lib/cli.js +++ b/lib/cli.js @@ -34,6 +34,9 @@ if (options.server) { } else { var json = (new Y.YUIDoc(options)).run(); + if (json === null) { + return; + } options = Y.Project.mix(json, options); if (!options.parseOnly) { diff --git a/lib/yuidoc.js b/lib/yuidoc.js index 3e4001c6..ff7827c1 100755 --- a/lib/yuidoc.js +++ b/lib/yuidoc.js @@ -335,6 +335,7 @@ YUI.add('yuidoc', function(Y) { if (this.options.lint) { this.lint(json.warnings); + return null; } /**