Skip to content

Commit 8780e0d

Browse files
committed
error out in header script when no header is found
1 parent 6d59e2a commit 8780e0d

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

tasks/header.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,11 @@ glob(path.join(constants.pathToSrc, '**/*.js'), function(err, files) {
4343

4444
var header = comments[0];
4545

46+
// error out if no header is found
47+
if(!header || header.loc.start.line > 1) {
48+
throw new Error(file + ' : has no header information.');
49+
}
50+
4651
// if header and license are the same, do nothing
4752
if(isCorrect(header)) return;
4853

0 commit comments

Comments
 (0)