Changeset 268752 in webkit
- Timestamp:
- Oct 20, 2020, 12:13:22 PM (6 years ago)
- Location:
- trunk/Tools
- Files:
-
- 2 edited
-
ChangeLog (modified) (1 diff)
-
Scripts/report-non-inclusive-language (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Tools/ChangeLog
r268749 r268752 1 2020-10-20 Aakash Jain <aakash_jain@apple.com> 2 3 Make report-non-inclusive-language ignore autoinstalled directories and certain file types 4 https://bugs.webkit.org/show_bug.cgi?id=217972 5 6 Reviewed by Beth Dakin. 7 8 * Scripts/report-non-inclusive-language: startswith and endswith also takes a tuple of suffixes to 9 look for, reference: https://docs.python.org/3/library/stdtypes.html#str.endswith 10 1 11 2020-10-20 Aakash Jain <aakash_jain@apple.com> 2 12 -
trunk/Tools/Scripts/report-non-inclusive-language
r265304 r268752 34 34 # Report third party sources separately from WebKit project files. 35 35 # Skip known examples on an exception list that we don't intend to fix. 36 # Replace special cases for ChangeLog, ".order", ".xcuserstate", ".git", ".svn"37 # files with something smarter.38 36 39 37 # Hard-coded for now, could read these out of a file instead. … … 44 42 [ "slave", "slave" ] 45 43 ] 44 45 IGNORE_DIRECTORIES = ['.svn', '.git', 'autoinstalled'] 46 IGNORE_FILES_STARTING_WITH = ('ChangeLog') 47 IGNORE_FILES_ENDING_WITH = ('.log', '.order', '.pyc', '.swp', '.xcuserstate') 46 48 47 49 parser = argparse.ArgumentParser(description='Report counts and locations of non-inclusive terms.') … … 57 59 for subroot, directories, files in os.walk(root): 58 60 prefix = subroot[len(root) + 1:] 59 if ".svn" in prefix: 60 continue 61 if ".git" in prefix: 61 if any(directory in prefix for directory in IGNORE_DIRECTORIES): 62 62 continue 63 63 for file in files: 64 if file.startswith( "ChangeLog"):64 if file.startswith(IGNORE_FILES_STARTING_WITH): 65 65 continue 66 if file.endswith(".order"): 67 continue 68 if file.endswith(".xcuserstate"): 66 if file.endswith(IGNORE_FILES_ENDING_WITH): 69 67 continue 70 68 handle = open(os.path.join(subroot, file), "r")
Note:
See TracChangeset
for help on using the changeset viewer.