Skip to content

Commit

Permalink
🐛 Fix failOnError to actually fail
Browse files Browse the repository at this point in the history
  • Loading branch information
Snugug committed Aug 30, 2015
1 parent ddec9d9 commit 531d307
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -88,8 +88,15 @@ sassLint.format = function (results) {
};

sassLint.failOnError = function (results) {
if (results.errorCount > 0) {
throw new Error(results.errorCount + ' errors detected in ' + results.filePath);
var result,
i;

for (i = 0; i < results.length; i++) {
result = results[i];

if (result.errorCount > 0) {
throw new Error(result.errorCount + ' errors detected in ' + result.filePath);
}
}
};

Expand Down

0 comments on commit 531d307

Please sign in to comment.