From 0bf526b2b3bdca1c969ee20536f9d739985e847f Mon Sep 17 00:00:00 2001 From: Eemeli Aro Date: Thu, 12 Mar 2026 13:30:59 +0200 Subject: [PATCH] Indicate rule for WEB_FEATURES.yml lint errors --- tools/web-features/lint.py | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/tools/web-features/lint.py b/tools/web-features/lint.py index 5748958b329..2b91fb8733a 100755 --- a/tools/web-features/lint.py +++ b/tools/web-features/lint.py @@ -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: