Permalink
Browse files

stop printing "Lint Free!" when no errors are found

  • Loading branch information...
1 parent b3fd586 commit b48a5600e784ece21200e5f93f3b3a8f9a0363b4 @brentlintner brentlintner committed Oct 27, 2011
Showing with 10 additions and 4 deletions.
  1. +3 −1 example/reporter.js
  2. +3 −1 lib/reporters/default.js
  3. +4 −2 lib/reporters/non_error.js
View
4 example/reporter.js
@@ -11,6 +11,8 @@ module.exports = {
error.character + ', ' + error.reason + '\n';
});
- process.stdout.write((len > 0 ? (str + "\n" + len + ' error' + ((len === 1) ? '' : 's')) : "Lint Free!") + "\n");
+ if (str) {
+ process.stdout.write(str + "\n" + len + ' error' + ((len === 1) ? '' : 's') + "\n");
+ }
}
};
View
4 lib/reporters/default.js
@@ -11,6 +11,8 @@ module.exports = {
error.character + ', ' + error.reason + '\n';
});
- process.stdout.write((len > 0 ? (str + "\n" + len + ' error' + ((len === 1) ? '' : 's')) : "Lint Free!") + "\n");
+ if (str) {
+ process.stdout.write(str + "\n" + len + ' error' + ((len === 1) ? '' : 's') + "\n");
+ }
}
};
View
6 lib/reporters/non_error.js
@@ -13,7 +13,7 @@ module.exports =
error.character + ', ' + error.reason + '\n';
});
- str += len > 0 ? ("\n" + len + ' error' + ((len === 1) ? '' : 's')) : "Lint Free!";
+ str += len > 0 ? ("\n" + len + ' error' + ((len === 1) ? '' : 's')) : "";
data.forEach(function (data) {
file = data.file;
@@ -38,6 +38,8 @@ module.exports =
}
});
- process.stdout.write(str + "\n");
+ if (str) {
+ process.stdout.write(str + "\n");
+ }
}
};

0 comments on commit b48a560

Please sign in to comment.