mirror of
https://github.com/mozilla/pdf.js.git
synced 2026-06-27 02:25:47 +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",
|
"examples/**/*.html",
|
||||||
"!web/wasm/**/*",
|
"!web/wasm/**/*",
|
||||||
],
|
],
|
||||||
{
|
{ base: "." }
|
||||||
base: ".",
|
|
||||||
}
|
|
||||||
)
|
)
|
||||||
.on("data", function (file) {
|
.on("data", function (file) {
|
||||||
|
if (!file.contents) {
|
||||||
|
console.warn(
|
||||||
|
` ${file.relative} is a directory, skipping license header check.`
|
||||||
|
);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
const relativePath = file.relative;
|
const relativePath = file.relative;
|
||||||
const content = file.contents.toString();
|
const content = file.contents.toString();
|
||||||
const re = relativePath.endsWith(".html") ? htmlRE : jsRE;
|
const re = relativePath.endsWith(".html") ? htmlRE : jsRE;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user