Lines Matching +full:- +full:- +full:working +full:- +full:dir
1 #! /usr/bin/python -B
6 # Copyright (C) 2009-2011, International Business Machines Corporation, Google and Others.
10 # Script to check that ICU source files contain only valid UTF-8 encoded text,
17 # icu-file-utf8-check.py [options]
20 # -h | --help Print a usage line and exit.
24 # No changes are made to the repository; only the working copy will be altered.
25 # The script checks all source files and returns a non-zero exit code if any of
26 # the checked files contain a non-UTF-8 character.
37 # List of directories to check for UTF-8 and BOM. Currently covers
44 "vendor/double-conversion/upstream/msvc/testrunner.cmd"
56 print("usage: " + sys.argv[0] + " [-h | --help]")
60 # File check. Check source code files for UTF-8 and all except text files for not containi…
72 bytes.decode("UTF-8")
74 print("Error: %s is a source code file but contains non-utf-8 bytes." % file_name)
80 print("Warning: file %s contains a UTF-8 BOM: " % file_name)
96 if opt in ("-h", "--help"):
105 git_cmd = "git ls-files DIR"
107 for dir in icu_directories_to_be_scanned:
108 print('Scanning ' + dir)
109 cmd = git_cmd.replace("DIR", dir)
117 print("Skipping dir " + f)
120 print("Repository file not in working copy: " + f)
129 # a non-null value otherwise.
130 output, rc = runCommand("grep -rPIl \"\\r\" " + f)