lint-test-expectations should be run during style checking
authorjbedard@apple.com <jbedard@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 20 Jul 2017 00:17:40 +0000 (00:17 +0000)
committerjbedard@apple.com <jbedard@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 20 Jul 2017 00:17:40 +0000 (00:17 +0000)
commitdec1712b8a3bb9739e070e20dad4318e8b8c3cae
tree3743be592e768acc94885de2e583827428678b65
parent20fb3f8c17f389a78ee88aabc570e4d567722bed
lint-test-expectations should be run during style checking
https://bugs.webkit.org/show_bug.cgi?id=173559
<rdar://problem/32854941>

Reviewed by Daniel Bates.

Follow up fix addressing style and a few minor bugs.

* Scripts/webkitpy/layout_tests/models/test_expectations.py:
(TestExpectationParser.__init__): Use lambda x: x instead of str
(TestExpectationsModel.__init__): Make lambda x: x the default argument.
(TestExpectationsModel._already_seen_better_match): Use a temporary variable to
reduce the calls of _shorten_filename, fix minor bug in appending the current
expectation's line number instead of the previous ones, clarify treatment of None
in file-to-line-number mapping.
(TestExpectations._report_warnings): Collapse call.
* Scripts/webkitpy/style/checkers/test_expectations.py:
(TestExpectationsChecker.lint_test_expectations):
* Scripts/webkitpy/style/filereader.py: Re-write comment.
(TextFileReader.process_file): Add comment explaining treatment of None in
file-to-line-number mapping.
(TextFileReader.delete_file): Collapse call.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@219669 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Tools/ChangeLog
Tools/Scripts/webkitpy/layout_tests/models/test_expectations.py
Tools/Scripts/webkitpy/style/checkers/test_expectations.py
Tools/Scripts/webkitpy/style/filereader.py