check-webkit-style: deleting lines in a file runs the linter on the whole file
authorjbedard@apple.com <jbedard@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 2 Aug 2017 22:35:44 +0000 (22:35 +0000)
committerjbedard@apple.com <jbedard@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 2 Aug 2017 22:35:44 +0000 (22:35 +0000)
commitb78e2551aae7dec8331059f282ffddb2f8eb858d
tree4afdd9ed08e5bbbb147f249c3e124722a7705dd2
parentc34a7bd32abdbccad4bafa8e41a5cedac9e445ec
check-webkit-style: deleting lines in a file runs the linter on the whole file
https://bugs.webkit.org/show_bug.cgi?id=175078

Reviewed by David Kilzer.

Deleting lines in a file should not cause linter errors to be blamed on the patch.
<https://bugs.webkit.org/show_bug.cgi?id=86142> is an example of this happening.

* Scripts/webkitpy/style/checkers/test_expectations.py:
(TestExpectationsChecker._should_log_linter_warning): Do not log a linter error if the file it is associated with only has deleted lines
* Scripts/webkitpy/style/main_unittest.py:
(ExpectationLinterInStyleCheckerTest.test_linter_duplicate_line): Added files should have every line number in the file when processing.
(ExpectationLinterInStyleCheckerTest.test_linter_duplicate_line_only_deletes): Test case where the file with the linter errors only contained deletes.
(ExpectationLinterInStyleCheckerTest.test_linter_added_file_with_error): Added files should have every line number in the file when processing.

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