Skip to content

Commit ec16619

Browse files
committed
[clean] Remove useless verbose mode
1 parent 2ebd03a commit ec16619

File tree

4 files changed

+6
-16
lines changed

4 files changed

+6
-16
lines changed

bin/jscomplexity-cli.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,9 @@ var
99
outputCLIReport = require('./lib/outputCLIReport')
1010
;
1111

12-
getSpec(function(pattern, globOptions, isVerbose, outPutFileName, reporter){
12+
getSpec(function(pattern, globOptions, outPutFileName, reporter){
1313

14-
scan(pattern, globOptions, isVerbose)
14+
scan(pattern, globOptions)
1515

1616
.then(function(data){
1717

bin/lib/getSpec.js

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -25,12 +25,8 @@ program
2525
'-r, --reporter <reporter>',
2626
'(optional) specify a reporter: \'terminal\', \'html\' or \'all\' - default is \'terminal\''
2727
)
28-
.option('-v, --verbose', '(optional) outputs analysisis logs')
2928
.parse(process.argv);
3029

31-
if(program.verbose) {
32-
options.isVerbose = true;
33-
}
3430
if(program.pattern){
3531
options.pattern = program.pattern;
3632
}
@@ -45,7 +41,6 @@ module.exports = function getSpec(callback){
4541
return callback(
4642
options.pattern,
4743
{},
48-
options.isVerbose,
4944
options.outputFileName,
5045
options.reporter
5146
);

src/lib/report.js

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -14,24 +14,20 @@ var analyse = require('./analyse');
1414
* @returns {Promise} The promise shall always be fulfilled
1515
*/
1616

17-
module.exports = function report (fileRef, isVerbose) {
17+
module.exports = function report (fileRef) {
1818

1919
return readFileAsync(fileRef, 'utf8')
2020

2121
.then(analyse(fileRef))
2222

2323
.then(function(result){
2424

25-
if (this.isVerbose) {
26-
console.log('%s | %s', result.complexity, fileRef);
27-
}
28-
2925
return {
3026
success : true,
3127
result : result
3228
};
3329

34-
}.bind(this))
30+
})
3531

3632
.caught(function(err){
3733

src/scan.js

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,10 @@ var reportAsync = require('./lib/report');
1414
* @public
1515
* @param {String} 'pattern' The glob pattern
1616
* @param {Array} 'globOptions' The glob options
17-
* @param {Boolean} 'isVerbose' The log stdout option
1817
* @returns {Promise} The fulfilled promise returns the final report
1918
*/
2019

21-
module.exports = function (pattern, globOptions, isVerbose){
20+
module.exports = function (pattern, globOptions){
2221

2322
return new Promise(function (resolve, reject) {
2423

@@ -37,7 +36,7 @@ module.exports = function (pattern, globOptions, isVerbose){
3736
var filesReports = [];
3837

3938
_.each(files, function(file){
40-
filesReports.push(reportAsync(file, isVerbose ? isVerbose : false));
39+
filesReports.push(reportAsync(file));
4140
});
4241

4342
Promise.all(filesReports)

0 commit comments

Comments
 (0)