Tidy checks for stylo

This commit is contained in:
Manish Goregaokar 2017-01-04 20:57:27 -08:00
parent cbfd446427
commit b60368d5d9
3 changed files with 32 additions and 17 deletions

View file

@ -26,6 +26,8 @@ class Lint(LintRunner):
yield f[len(working_dir):]
def run(self):
if self.stylo:
return
wpt_working_dir = os.path.abspath(os.path.join(WPT_PATH, "web-platform-tests"))
for suite in SUITES:
files = self._get_wpt_files(suite)

View file

@ -381,11 +381,13 @@ class MachCommands(CommandBase):
help="Don't show progress for tidy")
@CommandArgument('--self-test', default=False, action="store_true",
help="Run unit tests for tidy")
def test_tidy(self, all_files, no_progress, self_test):
@CommandArgument('--stylo', default=False, action="store_true",
help="Only handle files in the stylo tree")
def test_tidy(self, all_files, no_progress, self_test, stylo):
if self_test:
return test_tidy.do_tests()
else:
return tidy.scan(not all_files, not no_progress)
return tidy.scan(not all_files, not no_progress, stylo=stylo)
@Command('test-webidl',
description='Run the WebIDL parser tests',