diff --git a/.scripts/ci/check-license-header.js b/.scripts/ci/check-license-header.js index d0d6dc68f98..ca6b4a3d44a 100644 --- a/.scripts/ci/check-license-header.js +++ b/.scripts/ci/check-license-header.js @@ -13,6 +13,8 @@ SPDX-License-Identifier: Apache-2.0 SPDX-License-Identifier: MIT` const bundlerLicense = '// Copyright 2016-2019 Cargo-Bundle developers ' +const denoLicense = + '// Copyright 2018-2023 the Deno authors. All rights reserved. MIT license.' const extensions = ['.rs', '.js', '.ts', '.yml', '.swift', '.kt'] const ignore = [ @@ -26,7 +28,10 @@ const ignore = [ ] async function checkFile(file) { - if (extensions.some((e) => file.endsWith(e)) && !ignore.some((i) => file.includes(`/${i}/`))) { + if ( + extensions.some((e) => file.endsWith(e)) && + !ignore.some((i) => file.includes(`/${i}/`)) + ) { const fileStream = fs.createReadStream(file) const rl = readline.createInterface({ input: fileStream, @@ -41,7 +46,8 @@ async function checkFile(file) { line.length === 0 || line.startsWith('#!') || line.startsWith('// swift-tools-version:') || - line === bundlerLicense + line === bundlerLicense || + line === denoLicense ) { continue }