Title: [219542] trunk/Tools
- Revision
- 219542
- Author
- [email protected]
- Date
- 2017-07-15 21:47:03 -0700 (Sat, 15 Jul 2017)
Log Message
Make it possible to extend check-webkit-style with Apple-internal checkers
<https://webkit.org/b/174464>
<rdar://problem/25564402>
Reviewed by Darin Adler.
* Scripts/webkitpy/style/checker.py: Import apple_additions.
(_all_categories): Add categories from apple_additions() if it
exists.
(CheckerDispatcher._create_checker): Create python checker
from apple_additions() if it exists.
Modified Paths
Diff
Modified: trunk/Tools/ChangeLog (219541 => 219542)
--- trunk/Tools/ChangeLog 2017-07-16 04:01:30 UTC (rev 219541)
+++ trunk/Tools/ChangeLog 2017-07-16 04:47:03 UTC (rev 219542)
@@ -1,3 +1,17 @@
+2017-07-15 David Kilzer <[email protected]>
+
+ Make it possible to extend check-webkit-style with Apple-internal checkers
+ <https://webkit.org/b/174464>
+ <rdar://problem/25564402>
+
+ Reviewed by Darin Adler.
+
+ * Scripts/webkitpy/style/checker.py: Import apple_additions.
+ (_all_categories): Add categories from apple_additions() if it
+ exists.
+ (CheckerDispatcher._create_checker): Create python checker
+ from apple_additions() if it exists.
+
2017-07-15 Wenson Hsieh <[email protected]>
[iOS WK2] Presenting an action sheet on an image map prevents selection UI from updating
Modified: trunk/Tools/Scripts/webkitpy/style/checker.py (219541 => 219542)
--- trunk/Tools/Scripts/webkitpy/style/checker.py 2017-07-16 04:01:30 UTC (rev 219541)
+++ trunk/Tools/Scripts/webkitpy/style/checker.py 2017-07-16 04:47:03 UTC (rev 219542)
@@ -61,6 +61,7 @@
from optparser import ArgumentParser
from optparser import DefaultCommandOptionValues
from webkitpy.common.system.logutils import configure_logging as _configure_logging
+from webkitpy.port.config import apple_additions
_log = logging.getLogger(__name__)
@@ -374,6 +375,9 @@
# settings against the known categories, etc).
categories = categories.union(["pep8/W191", "pep8/W291", "pep8/E501"])
+ if apple_additions():
+ categories = categories.union(apple_additions().all_categories())
+
return categories
@@ -643,7 +647,10 @@
else:
checker = JSONChecker(file_path, handle_style_error)
elif file_type == FileType.PYTHON:
- checker = PythonChecker(file_path, handle_style_error)
+ if apple_additions():
+ checker = apple_additions().python_checker(file_path, handle_style_error)
+ else:
+ checker = PythonChecker(file_path, handle_style_error)
elif file_type == FileType.XML:
checker = XMLChecker(file_path, handle_style_error)
elif file_type == FileType.XCODEPROJ:
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes