Skip to content

Commit

Permalink
Lib: Skip empty file list
Browse files Browse the repository at this point in the history
Fixes #79
  • Loading branch information
jzaefferer committed Sep 30, 2015
1 parent e873539 commit fe038b9
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
4 changes: 4 additions & 0 deletions lib/htmllint.js
Expand Up @@ -23,6 +23,10 @@ module.exports = function(config, done) {
return str;
}

if (!config.files.length) {
return done(null, []);
}

javadetect(function(err, java) {
if (err) {
throw err;
Expand Down
5 changes: 5 additions & 0 deletions test/html_test.js
Expand Up @@ -51,6 +51,11 @@ exports.htmllint = {
}, expected, 'four errors from test/invalid.html');
}
},
'empty': function(test) {
run(test, {
files: []
}, [], '0 errors from 0 files');
},
'ignore': function(test) {
run(test, {
ignore: [
Expand Down

0 comments on commit fe038b9

Please sign in to comment.