Fix bugs in mach test-tidy (#31232)

* mach: test-tidy should return 1 for failure

Signed-off-by: Mukilan Thiyagarajan <mukilan@igalia.com>

* fix lint issues

Signed-off-by: Mukilan Thiyagarajan <mukilan@igalia.com>

* mach: tidy should allow spec links with trailing text

Signed-off-by: Mukilan Thiyagarajan <mukilan@igalia.com>

---------

Signed-off-by: Mukilan Thiyagarajan <mukilan@igalia.com>
This commit is contained in:
Mukilan Thiyagarajan 2024-01-31 11:20:36 +05:30 committed by GitHub
parent b2f73723f8
commit 04a9b8ca39
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 4 additions and 6 deletions

View file

@ -822,7 +822,7 @@ def check_spec(file_name, lines):
macro_patt = re.compile(r"^\s*\S+!(.*)$")
# Pattern representing a line with comment containing a spec link
link_patt = re.compile(r"^\s*///? (<https://.+>|https://.+)$")
link_patt = re.compile(r"^\s*///? (<https://.+>.*|https://.+)$")
# Pattern representing a line with comment or attribute
comment_patt = re.compile(r"^\s*(///?.+|#\[.+\])$")