From ad91f3abc8202a7c22d07d1486a93bd6575b58b6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicol=C3=B2=20Ribaudo?= Date: Wed, 4 Mar 2026 16:17:38 +0100 Subject: [PATCH] Ignore directories in lint-licenses task The glob pattern will include directories that have a name ending, for example, with `.js`. --- gulpfile.mjs | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/gulpfile.mjs b/gulpfile.mjs index e694e8357..11c0f3b57 100644 --- a/gulpfile.mjs +++ b/gulpfile.mjs @@ -2083,11 +2083,16 @@ gulp.task("lint-licenses", function (done) { "examples/**/*.html", "!web/wasm/**/*", ], - { - base: ".", - } + { base: "." } ) .on("data", function (file) { + if (!file.contents) { + console.warn( + ` ${file.relative} is a directory, skipping license header check.` + ); + return; + } + const relativePath = file.relative; const content = file.contents.toString(); const re = relativePath.endsWith(".html") ? htmlRE : jsRE;