zeta: Add LICENSE.md and LICENCE.md to license detection (#25422)

Maybe it's not a very common, but it has a place to be.

Release Notes:

- Added `LICENSE.md` and `LICENCE.md` files to license detection for
edit prediction.

---------

Co-authored-by: Marshall Bowers <git@maxdeviant.com>
This commit is contained in:
Aivaz Latypov 2025-02-23 20:08:24 +05:00 committed by GitHub
parent 65f76e6f4d
commit 7e097d529a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -1,7 +1,14 @@
use regex::Regex; use regex::Regex;
/// The most common license locations, with US and UK English spelling. /// The most common license locations, with US and UK English spelling.
pub const LICENSE_FILES_TO_CHECK: &[&str] = &["LICENSE", "LICENCE", "LICENSE.txt", "LICENCE.txt"]; pub const LICENSE_FILES_TO_CHECK: &[&str] = &[
"LICENSE",
"LICENCE",
"LICENSE.txt",
"LICENCE.txt",
"LICENSE.md",
"LICENCE.md",
];
pub fn is_license_eligible_for_data_collection(license: &str) -> bool { pub fn is_license_eligible_for_data_collection(license: &str) -> bool {
// TODO: Include more licenses later (namely, Apache) // TODO: Include more licenses later (namely, Apache)