From ee9ebdf150fb8da707bb5971deffd0abddeba624 Mon Sep 17 00:00:00 2001 From: Roman Barbun Date: Tue, 12 Nov 2024 16:58:26 +1100 Subject: [PATCH] Removed test file. --- api/tests/validate-html.py | 30 ------------------------------ 1 file changed, 30 deletions(-) delete mode 100644 api/tests/validate-html.py diff --git a/api/tests/validate-html.py b/api/tests/validate-html.py deleted file mode 100644 index cc86051..0000000 --- a/api/tests/validate-html.py +++ /dev/null @@ -1,30 +0,0 @@ -#!/usr/bin/python3 -# Copyright (c) Ansible Project -# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) -# SPDX-License-Identifier: GPL-3.0-or-later - -from __future__ import annotations - -import os -import sys - -import html5lib - -errors = 0 -for path in sys.argv[1:]: - for dirname, _, files in os.walk(path): - for file in files: - if not file.endswith(".html"): - continue - path = os.path.join(dirname, file) - try: - parser = html5lib.HTMLParser(strict=True) - with open(path, "rb") as f: - document = parser.parse(f) - except Exception as e: - errors += 1 - print(f"{path}: {e}") - -if errors > 0: - print(f"Found {errors} errors!") - sys.exit(1)