Skip to content
Prev Previous commit
Next Next commit
error out in header script when no header is found
  • Loading branch information
etpinard committed Jan 14, 2016
commit 8780e0d16ee00351c01005844df058e21ca165d5
5 changes: 5 additions & 0 deletions tasks/header.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,11 @@ glob(path.join(constants.pathToSrc, '**/*.js'), function(err, files) {

var header = comments[0];

// error out if no header is found
if(!header || header.loc.start.line > 1) {
throw new Error(file + ' : has no header information.');
}

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

😸

// if header and license are the same, do nothing
if(isCorrect(header)) return;

Expand Down