mirror of
https://github.com/mozilla/pdf.js.git
synced 2026-04-09 23:04:02 +02:00
Merge pull request #20796 from nicolo-ribaudo/fix-license-lint
Ignore directories in lint-licenses task
This commit is contained in:
commit
c41be4fd88
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