aboutsummaryrefslogtreecommitdiffstats
path: root/python/servo/lints/wpt_lint.py
diff options
context:
space:
mode:
authorbors-servo <infra@servo.org>2023-06-16 03:39:29 +0200
committerGitHub <noreply@github.com>2023-06-16 03:39:29 +0200
commit1fb7d45d5ff15dd1df67e6dfc62db813d2e2e948 (patch)
treeffa67b064764c1a131de526fbfb8be9f62b6e90e /python/servo/lints/wpt_lint.py
parenta06881611308364f30a51ce887372d45511c9fbc (diff)
parent81433a8684d078ae629ba24f30f877028e361136 (diff)
downloadservo-1fb7d45d5ff15dd1df67e6dfc62db813d2e2e948.tar.gz
servo-1fb7d45d5ff15dd1df67e6dfc62db813d2e2e948.zip
Auto merge of #29877 - mrobinson:unegg-tidy, r=jdm
Convert tidy to a non-egg Python package It seems that servo-tidy is only used by webrender in my GitHub searches. WebRender could simply use `rustfmt` and the tidy on pypi hasn't been updated since 2018. Converting tidy to a normal Python package removes the maintenance burden of continually fixing the easy install configuration. Fixes #29094. Fixes #29334. <!-- Please describe your changes on the following line: --> --- <!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `___` with appropriate data: --> - [x] `./mach build -d` does not report any errors - [x] `./mach test-tidy` does not report any errors - [x] These changes fix #29094. - [x] These changes fix #29334. - [x] There are tests for these changes <!-- Also, please make sure that "Allow edits from maintainers" checkbox is checked, so that we can help you if you get stuck somewhere along the way.--> <!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->
Diffstat (limited to 'python/servo/lints/wpt_lint.py')
-rw-r--r--python/servo/lints/wpt_lint.py45
1 files changed, 0 insertions, 45 deletions
diff --git a/python/servo/lints/wpt_lint.py b/python/servo/lints/wpt_lint.py
deleted file mode 100644
index ada03b65a99..00000000000
--- a/python/servo/lints/wpt_lint.py
+++ /dev/null
@@ -1,45 +0,0 @@
-# Copyright 2013 The Servo Project Developers. See the COPYRIGHT
-# file at the top-level directory of this distribution.
-#
-# Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-# http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-# <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-# option. This file may not be copied, modified, or distributed
-# except according to those terms.
-
-from __future__ import print_function
-
-import os
-import sys
-
-from servo_tidy.tidy import LintRunner, filter_file
-
-WPT_PATH = os.path.join(".", "tests", "wpt")
-SUITES = ["web-platform-tests", os.path.join("mozilla", "tests")]
-
-
-class Lint(LintRunner):
- def _get_wpt_files(self, suite):
- working_dir = os.path.join(WPT_PATH, suite, '')
- file_iter = self.get_files(working_dir, exclude_dirs=[])
- print('\nRunning the WPT lint on %s...' % working_dir)
- for f in file_iter:
- if filter_file(f):
- yield f[len(working_dir):]
-
- def run(self):
- if self.stylo or self.no_wpt:
- return
-
- wpt_working_dir = os.path.abspath(os.path.join(WPT_PATH, "web-platform-tests"))
- for suite in SUITES:
- files = list(self._get_wpt_files(suite))
- if not files:
- continue
- sys.path.insert(0, wpt_working_dir)
- from tools.lint import lint
- file_dir = os.path.abspath(os.path.join(WPT_PATH, suite))
- returncode = lint.lint(file_dir, files, output_format="json")
- sys.path.remove(wpt_working_dir)
- if returncode:
- yield ("WPT Lint Tool", "", "lint error(s) in Web Platform Tests: exit status %s" % returncode)