Merge pull request #20796 from nicolo-ribaudo/fix-license-lint

Ignore directories in lint-licenses task
This commit is contained in:
calixteman 2026-03-04 16:29:10 +01:00 committed by GitHub
commit c41be4fd88
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -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;