mirror of
https://github.com/servo/servo.git
synced 2025-10-16 08:20:22 +01:00
Update web-platform-tests to revision 756a676d640e9a772f565964285b2f20f6164fce
This commit is contained in:
parent
a38f28f811
commit
3d5ad91231
3066 changed files with 23973 additions and 26209 deletions
|
@ -680,6 +680,21 @@ def check_script_metadata(repo_root, path, f):
|
|||
return errors
|
||||
|
||||
|
||||
ahem_font_re = re.compile(b"font.*:.*ahem", flags=re.IGNORECASE)
|
||||
ahem_stylesheet_re = re.compile(b"\/fonts\/ahem\.css", flags=re.IGNORECASE)
|
||||
|
||||
|
||||
def check_ahem_system_font(repo_root, path, f):
|
||||
# type: (str, str, IO[bytes]) -> List[rules.Error]
|
||||
if not path.endswith((".html", ".htm", ".xht", ".xhtml")):
|
||||
return []
|
||||
contents = f.read()
|
||||
errors = []
|
||||
if ahem_font_re.search(contents) and not ahem_stylesheet_re.search(contents):
|
||||
errors.append(rules.AhemSystemFont.error(path))
|
||||
return errors
|
||||
|
||||
|
||||
def check_path(repo_root, path):
|
||||
# type: (str, str) -> List[rules.Error]
|
||||
"""
|
||||
|
@ -918,7 +933,8 @@ def lint(repo_root, paths, output_format):
|
|||
path_lints = [check_file_type, check_path_length, check_worker_collision, check_ahem_copy,
|
||||
check_gitignore_file]
|
||||
all_paths_lints = [check_css_globally_unique]
|
||||
file_lints = [check_regexp_line, check_parsed, check_python_ast, check_script_metadata]
|
||||
file_lints = [check_regexp_line, check_parsed, check_python_ast, check_script_metadata,
|
||||
check_ahem_system_font]
|
||||
|
||||
# Don't break users of the lint that don't have git installed.
|
||||
try:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue