lists: exclude licenses from domain substitution

This commit is contained in:
jj
2025-04-10 21:38:23 +00:00
parent fc513c539a
commit 25f18729d6
2 changed files with 5 additions and 6 deletions

View File

@@ -119,6 +119,8 @@ DOMAIN_EXCLUDE_PREFIXES = [
'chrome/common/extensions/api/_api_features.json',
'extensions/common/extension_urls.cc',
'extensions/browser/updater/safe_manifest_parser.cc',
# License/credits stuff
'tools/licenses/licenses.py',
]
# pylint: enable=line-too-long
@@ -249,6 +251,9 @@ def should_domain_substitute(path, relative_path, search_regex, used_dep_set, us
if relative_path_posix.startswith(exclude_prefix):
used_dep_set.add(exclude_prefix)
return False
for license_path in ['license', 'license.txt', 'license.html']:
if relative_path_posix.endswith('/' + license_path):
return False
return _check_regex_match(path, search_regex)
return False