Changeset 152639 in webkit


Ignore:
Timestamp:
Jul 15, 2013 9:32:41 AM (11 years ago)
Author:
commit-queue@webkit.org
Message:

check-webkit-style: Ignore false positive: Instance of 'Popen' has no 'pid' member
https://bugs.webkit.org/show_bug.cgi?id=118592

Patch by Brian Holt <brian.holt@samsung.com> on 2013-07-15
Reviewed by Martin Robinson.

Added a suppression for pylint false positives and a unit test.

  • Scripts/webkitpy/style/checkers/python.py:

(Pylinter):

  • Scripts/webkitpy/style/checkers/python_unittest.py:

(PythonCheckerTest.test_check):
(PythonCheckerTest):
(PythonCheckerTest.test_pylint_false_positives):
(PythonCheckerTest.test_pylint_false_positives._mock_handle_style_error):

  • Scripts/webkitpy/style/checkers/python_unittest_falsepositives.py: Added.

(test_popen):

Location:
trunk/Tools
Files:
1 added
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/Tools/ChangeLog

    r152629 r152639  
     12013-07-15  Brian Holt  <brian.holt@samsung.com>
     2
     3        check-webkit-style: Ignore false positive: Instance of 'Popen' has no 'pid' member
     4        https://bugs.webkit.org/show_bug.cgi?id=118592
     5
     6        Reviewed by Martin Robinson.
     7
     8        Added a suppression for pylint false positives and a unit test.
     9
     10        * Scripts/webkitpy/style/checkers/python.py:
     11        (Pylinter):
     12        * Scripts/webkitpy/style/checkers/python_unittest.py:
     13        (PythonCheckerTest.test_check):
     14        (PythonCheckerTest):
     15        (PythonCheckerTest.test_pylint_false_positives):
     16        (PythonCheckerTest.test_pylint_false_positives._mock_handle_style_error):
     17        * Scripts/webkitpy/style/checkers/python_unittest_falsepositives.py: Added.
     18        (test_popen):
     19
    1202013-07-15  Xabier Rodriguez Calvar  <calvaris@igalia.com>
    221
  • trunk/Tools/Scripts/webkitpy/style/checkers/python.py

    r152602 r152639  
    9696        "Instance of 'Popen' has no 'stderr' member",
    9797        "Instance of 'Popen' has no 'wait' member",
     98        "Instance of 'Popen' has no 'pid' member",
    9899    ]
    99100
  • trunk/Tools/Scripts/webkitpy/style/checkers/python_unittest.py

    r152602 r152639  
    6262            (4, "pylint/E0602", 5, "Undefined variable 'error'"),
    6363            ])
     64
     65    def test_pylint_false_positives(self):
     66        """Test that pylint false positives are suppressed."""
     67        errors = []
     68
     69        def _mock_handle_style_error(line_number, category, confidence,
     70                                     message):
     71            error = (line_number, category, confidence, message)
     72            errors.append(error)
     73
     74        current_dir = os.path.dirname(__file__)
     75        file_path = os.path.join(current_dir, "python_unittest_falsepositives.py")
     76
     77        checker = PythonChecker(file_path, _mock_handle_style_error)
     78        checker.check(lines=[])
     79
     80        self.assertEqual(errors, [])
Note: See TracChangeset for help on using the changeset viewer.