Changeset 254479 in webkit


Ignore:
Timestamp:
Jan 13, 2020 5:37:33 PM (4 years ago)
Author:
yoshiaki.jitsukawa@sony.com
Message:

Fix path-specific filters on Windows
https://bugs.webkit.org/show_bug.cgi?id=205786

Reviewed by David Kilzer.

  • Scripts/webkitpy/style/filter.py:

(FilterConfiguration._path_rules_from_path):
Convert forward slashes to backward slashes on Windows by using
os.path.normcase(). Nothing changed on other OSs.

  • Scripts/webkitpy/style/filter_unittest.py:

(FilterConfigurationTest.test_path_with_different_case):

Location:
trunk/Tools
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/Tools/ChangeLog

    r254473 r254479  
     12020-01-13  Yoshiaki Jitsukawa  <yoshiaki.jitsukawa@sony.com>
     2
     3        Fix path-specific filters on Windows
     4        https://bugs.webkit.org/show_bug.cgi?id=205786
     5
     6        Reviewed by David Kilzer.
     7
     8        * Scripts/webkitpy/style/filter.py:
     9        (FilterConfiguration._path_rules_from_path):
     10        Convert forward slashes to backward slashes on Windows by using
     11        os.path.normcase(). Nothing changed on other OSs.
     12        * Scripts/webkitpy/style/filter_unittest.py:
     13        (FilterConfigurationTest.test_path_with_different_case):
     14
    1152020-01-13  David Kilzer  <ddkilzer@apple.com>
    216
  • trunk/Tools/Scripts/webkitpy/style/filter.py

    r252468 r254479  
    2323"""Contains filter-related code."""
    2424
     25import os.path
    2526
    2627def validate_filter_rules(filter_rules, all_categories):
     
    210211        """
    211212        path = path.lower()
     213        path = os.path.normcase(path)
    212214        for (sub_paths, path_rules) in self._get_path_specific_lower():
    213215            for sub_path in sub_paths:
  • trunk/Tools/Scripts/webkitpy/style/filter_unittest.py

    r252468 r254479  
    2424
    2525import unittest
     26import os
    2627
    2728from webkitpy.style.filter import _CategoryFilter as CategoryFilter
     
    235236        """Test a path that differs only in case."""
    236237        base_rules = ["-"]
    237         path_specific = [(["Foo/"], ["+whitespace"])]
     238        path_specific = [([os.path.join("Foo", "")], ["+whitespace"])]
    238239        user_rules = []
    239240
Note: See TracChangeset for help on using the changeset viewer.