From e4bbd938447e89cd08626d8a1837d37b11a37cfa Mon Sep 17 00:00:00 2001 From: ido Date: Thu, 16 Apr 2015 17:41:52 +0300 Subject: [PATCH] cleanups --- src/shell.js | 30 ++---------------------------- 1 file changed, 2 insertions(+), 28 deletions(-) diff --git a/src/shell.js b/src/shell.js index 1e261c6..7e3267e 100644 --- a/src/shell.js +++ b/src/shell.js @@ -5,8 +5,6 @@ function printResults(context) { var _ = require('lodash'); // var wfs = require('./wfs'); - - var errorCount = 0; var warnings = context.getMessages(); var out = require('./formatters/' + context.options.format)(warnings); // if (context.options.outFile) { @@ -16,33 +14,9 @@ function printResults(context) { // } context.report(out); var grouped = _.groupBy(warnings, 'level'); - errorCount = grouped.ERROR ? grouped.ERROR.length : 0; - return errorCount; + return grouped.ERROR ? grouped.ERROR.length : 0; } -/** - * print help for a command - * @param {string} command - * @return {number} - */ -//function printHelp(command) { -// var wfs = require('./wfs'); -// var path = require('path'); -// var h = wfs.readJSON(path.resolve(__dirname, 'data/help.json')); -// var commandHelp = h.commands[command]; -// if (!commandHelp) { -// console.log('could not find help for command ' + command); -// return 1; -// } -// var msg = 'SYNOPSIS\n' + -// ' ' + commandHelp.SYNOPSIS + '\n' + -// 'DESCRIPTION\n' + -// ' ' + commandHelp.DESCRIPTION; -// console.log(msg); -// return 0; -//} - module.exports = { - printResults: printResults//, -// printHelp: printHelp + printResults: printResults }; \ No newline at end of file