Title: [282564] trunk/Tools
Revision
282564
Author
you...@apple.com
Date
2021-09-16 11:12:28 -0700 (Thu, 16 Sep 2021)

Log Message

Add an option to disable linter in WPT test exporter
https://bugs.webkit.org/show_bug.cgi?id=230345

Reviewed by Jonathan Bedard.

Some existings WPT tests are failing the linter.
While we should probably try to restrict linter to test files actually modified, let's add an option to disable linter for now.

* Scripts/webkitpy/w3c/test_exporter.py:
(WebPlatformTestExporter.do_export):
(parse_args):

Modified Paths

Diff

Modified: trunk/Tools/ChangeLog (282563 => 282564)


--- trunk/Tools/ChangeLog	2021-09-16 18:12:14 UTC (rev 282563)
+++ trunk/Tools/ChangeLog	2021-09-16 18:12:28 UTC (rev 282564)
@@ -1,3 +1,17 @@
+2021-09-16  Youenn Fablet  <you...@apple.com>
+
+        Add an option to disable linter in WPT test exporter
+        https://bugs.webkit.org/show_bug.cgi?id=230345
+
+        Reviewed by Jonathan Bedard.
+
+        Some existings WPT tests are failing the linter.
+        While we should probably try to restrict linter to test files actually modified, let's add an option to disable linter for now.
+
+        * Scripts/webkitpy/w3c/test_exporter.py:
+        (WebPlatformTestExporter.do_export):
+        (parse_args):
+
 2021-09-16  Hoa Dinh  <d...@apple.com>
 
         Allow use of --git-index and --git-commit at the same time when using with --only-files

Modified: trunk/Tools/Scripts/webkitpy/w3c/test_exporter.py (282563 => 282564)


--- trunk/Tools/Scripts/webkitpy/w3c/test_exporter.py	2021-09-16 18:12:14 UTC (rev 282563)
+++ trunk/Tools/Scripts/webkitpy/w3c/test_exporter.py	2021-09-16 18:12:28 UTC (rev 282564)
@@ -383,12 +383,13 @@
         if git_patch_file:
             self._filesystem.remove(git_patch_file)
 
-        lint_errors = self._linter.lint()
-        if lint_errors:
-            _log.error("The wpt linter detected %s linting error(s). Please address the above errors before attempting to export changes to the web-platform-test repository." % (lint_errors,))
-            self.delete_local_branch()
-            self.clean()
-            return
+        if self._options.use_linter:
+            lint_errors = self._linter.lint()
+            if lint_errors:
+                _log.error("The wpt linter detected %s linting error(s). Please address the above errors before attempting to export changes to the web-platform-test repository." % (lint_errors,))
+                self.delete_local_branch()
+                self.clean()
+                return
 
         try:
             if self.push_to_wpt_fork():
@@ -432,6 +433,7 @@
     parser.add_argument('-d', '--repository', dest='repository_directory', default=None, help='repository directory')
     parser.add_argument('-c', '--create-pr', dest='create_pull_request', action='', default=False, help='create pull request to w3c web-platform-tests')
     parser.add_argument('--non-interactive', action='', dest='non_interactive', default=False, help='Never prompt the user, fail as fast as possible.')
+    parser.add_argument('--no-linter', action='', dest='use_linter', default=True, help='Disable linter.')
 
     options, args = parser.parse_known_args(args)
 
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to