From 2f2d5c9e278290ed8701f320cfd56d73437169ff Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicol=C3=B2=20Ribaudo?= Date: Tue, 3 Mar 2026 11:21:29 +0100 Subject: [PATCH] Add script to check license headers --- gulpfile.mjs | 79 +++++++++++++++++++++++- src/core/jpg.js | 4 +- test/downloadutils.mjs | 3 +- test/font/fontutils.js | 3 +- test/font/ttxdriver.mjs | 3 +- test/integration/thumbnail_view_spec.mjs | 15 +++++ test/test.mjs | 3 +- test/testutils.mjs | 3 +- test/webserver.mjs | 3 +- 9 files changed, 100 insertions(+), 16 deletions(-) diff --git a/gulpfile.mjs b/gulpfile.mjs index f1876aed2..e694e8357 100644 --- a/gulpfile.mjs +++ b/gulpfile.mjs @@ -2041,6 +2041,82 @@ gulp.task( ) ); +gulp.task("lint-licenses", function (done) { + console.log("\n### Checking license headers"); + + const jsRE = + /^(?:#[^\n]*\n)?\/\* Copyright \d{4} Mozilla Foundation\n \*\n \* Licensed under the Apache License, Version 2\.0 \(the "License"\);/; + const htmlRE = /^\n