mirror of
https://github.com/mozilla/pdf.js.git
synced 2026-04-17 10:44:03 +02:00
Ignore directories in lint-licenses task
The glob pattern will include directories that have a name ending, for example, with `.js`.
This commit is contained in:
parent
40bd73551c
commit
ad91f3abc8
11
gulpfile.mjs
11
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;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user