Skip to content

Commit

Permalink
chore: allow license check to be multiline (#659)
Browse files Browse the repository at this point in the history
Currently, when you add your own license to modified files, it will
complain.

This changes the regex so that it can be multiline.
  • Loading branch information
matthewford authored Jan 22, 2024
1 parent 53b8962 commit 5ec7f0b
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion tasks/check_license.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@ const ROOT = new URL("../", import.meta.url);
const CHECK = Deno.args.includes("--check");
const CURRENT_YEAR = new Date().getFullYear();
const RX_COPYRIGHT = new RegExp(
`// Copyright 2023-([0-9]{4}) the Deno authors\\. All rights reserved\\. MIT license\\.\n`,
`// Copyright 2023-([0-9]{4}) the Deno authors\\. All rights reserved\\. MIT license\\.\\n`,
"m",
);
const COPYRIGHT =
`// Copyright 2023-${CURRENT_YEAR} the Deno authors. All rights reserved. MIT license.`;
Expand Down

0 comments on commit 5ec7f0b

Please sign in to comment.