• Home
  • Raw
  • Download

Lines Matching +full:is +full:- +full:glob

2 # coding=utf-8
9 # http://www.apache.org/licenses/LICENSE-2.0
12 # distributed under the License is distributed on an "AS IS" BASIS,
54 # A regular expression to make a range of years in the form <year1>-<year2>.
58 YEAR_RANGE_REGEX += str(year1) + '-' + str(year2) + '|'
59 YEAR_RANGE_REGEX = YEAR_RANGE_REGEX[:-1] + ')'
61 # In the copyright info, the year can be a single year or a range. This is a
69 MIT_BEGIN_RE = re.compile('Permission is hereby granted, '
81 http://www.apache.org/licenses/LICENSE-2.0
84 distributed under the License is distributed on an "AS IS" BASIS,
98 for glob in skip_glob_dir_list:
99 for match in fnmatch.filter(dirs, glob):
108 def filtered_descendants(glob): argument
109 """Returns glob-matching filenames under the current directory, but skips
111 return find('.', glob, ['third_party', 'external', 'CompilerIdCXX',
112 'build*', 'out*'], ['./utils/clang-format-diff.py'])
116 """Returns true if line is all whitespace or shebang."""
122 """Returns commented-out text.
131 def insert_copyright(author, glob, comment_prefix): argument
132 """Finds all glob-matching files under the current directory and inserts the
134 use license (modified MIT) is replaced with an Apache 2 license.
136 The copyright message goes into the first non-whitespace, non-shebang line
144 for file in filtered_descendants(glob):
170 # Assume an Apache license is preceded by a copyright
183 def alert_if_no_copyright(glob, comment_prefix): argument
186 Finds all glob-matching files under the current directory and checks if they
193 for file in filtered_descendants(glob):
198 with open(file, encoding='utf-8') as contents:
205 if (line_num is apache_expected_end) and APACHE2_END_RE.search(line):
222 self.add_argument('--update', dest='author', action='store',
238 print('error: --update argument must be in the AUTHORS list in '