Skip to content

Commit

Permalink
fix make.js lint: declare output function only once
Browse files Browse the repository at this point in the history
  • Loading branch information
bkw committed Oct 30, 2012
1 parent f081b55 commit f1ab4d2
Showing 1 changed file with 14 additions and 14 deletions.
28 changes: 14 additions & 14 deletions make.js
Original file line number Diff line number Diff line change
Expand Up @@ -64,23 +64,23 @@ target.lint = function () {
return;
}

for (var key in failures) {
cli.error(key);

failures[key].errors.forEach(function (err) {
if (!err) {
return;
}

var line = "[L" + err.line + "]";
while (line.length < 10) {
line += " ";
}
var outputError = function (err) {
if (!err) {
return;
}

echo(line, err.reason);
});
var line = "[L" + err.line + "]";
while (line.length < 10) {
line += " ";
}

echo(line, err.reason);
echo("\n");
};

for (var key in failures) {
cli.error(key);
failures[key].errors.forEach(outputError);
}

exit(1);
Expand Down

0 comments on commit f1ab4d2

Please sign in to comment.