mirror of
https://github.com/morgan9e/helium
synced 2026-04-14 00:14:20 +09:00
lists: exclude licenses from domain substitution
This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user