Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 7 additions & 4 deletions tools/web-features/lint.py
Original file line number Diff line number Diff line change
Expand Up @@ -105,10 +105,13 @@ def main(web_features_filename, manifest_filename):
path_specs = feature['files']
tag_specs = feature.get('tags', [])

manifest['data'][name] = [*filter(
lambda candidate: match(candidate, tag_specs),
get_filenames_from_path_specs(path_specs)
)]
try:
manifest['data'][name] = [*filter(
lambda candidate: match(candidate, tag_specs),
get_filenames_from_path_specs(path_specs)
)]
except AssertionError as error:
raise ValueError(f"Invalid rule for {name}") from error

if manifest_filename:
with open(manifest_filename, 'w') as manifest_handle:
Expand Down
Loading