OLD | NEW |
1 #!/usr/bin/python | 1 #!/usr/bin/python |
2 # Copyright (c) 2011 The Chromium Authors. All rights reserved. | 2 # Copyright (c) 2011 The Chromium Authors. All rights reserved. |
3 # Use of this source code is governed by a BSD-style license that can be | 3 # Use of this source code is governed by a BSD-style license that can be |
4 # found in the LICENSE file. | 4 # found in the LICENSE file. |
5 | 5 |
6 """Makes sure that all files contain proper licensing information.""" | 6 """Makes sure that all files contain proper licensing information.""" |
7 | 7 |
8 | 8 |
9 import optparse | 9 import optparse |
10 import os.path | 10 import os.path |
(...skipping 19 matching lines...) Expand all Loading... |
30 | 30 |
31 | 31 |
32 WHITELISTED_LICENSES = [ | 32 WHITELISTED_LICENSES = [ |
33 'Apache (v2.0)', | 33 'Apache (v2.0)', |
34 'Apache (v2.0) BSD (2 clause)', | 34 'Apache (v2.0) BSD (2 clause)', |
35 'BSD', | 35 'BSD', |
36 'BSD (2 clause)', | 36 'BSD (2 clause)', |
37 'BSD (2 clause) MIT/X11 (BSD like)', | 37 'BSD (2 clause) MIT/X11 (BSD like)', |
38 'BSD (3 clause)', | 38 'BSD (3 clause)', |
39 'BSD (3 clause) ISC', | 39 'BSD (3 clause) ISC', |
40 'BSD (3 clause) LGPL (v2.1 or later) (with incorrect FSF address)', | 40 'BSD (3 clause) LGPL (v2.1 or later)', |
41 'BSD (3 clause) MIT/X11 (BSD like)', | 41 'BSD (3 clause) MIT/X11 (BSD like)', |
42 'BSD (4 clause)', | 42 'BSD (4 clause)', |
43 'BSD-like', | 43 'BSD-like', |
44 | 44 |
45 # TODO(phajdan.jr): Make licensecheck not print BSD-like twice. | 45 # TODO(phajdan.jr): Make licensecheck not print BSD-like twice. |
46 'BSD-like BSD (2 clause)', | |
47 'BSD-like BSD (3 clause)', | |
48 'BSD-like MIT/X11 (BSD like)', | 46 'BSD-like MIT/X11 (BSD like)', |
49 | 47 |
50 'BSL (v1.0)', | 48 'BSL (v1.0)', |
51 # TODO(phajdan.jr): Make licensecheck not print the comma after 3.1. | 49 # TODO(phajdan.jr): Make licensecheck not print the comma after 3.1. |
52 'BSL (v1.0) GPL (v3.1,)', | 50 'BSL (v1.0) GPL (v3.1,)', |
53 'ISC', | 51 'ISC', |
54 'LGPL', | 52 'LGPL', |
55 'LGPL (v2)', | 53 'LGPL (v2)', |
56 'LGPL (v2 or later)', | 54 'LGPL (v2 or later)', |
57 'LGPL (v2 or later) (with incorrect FSF address)', | |
58 'LGPL (v2.1)', | 55 'LGPL (v2.1)', |
59 'LGPL (v3 or later)', | 56 'LGPL (v3 or later)', |
60 | 57 |
61 # TODO(phajdan.jr): Make licensecheck convert that comma to a dot. | 58 # TODO(phajdan.jr): Make licensecheck convert that comma to a dot. |
62 'LGPL (v2,1 or later)', | 59 'LGPL (v2,1 or later)', |
63 | 60 |
64 'LGPL (v2.1 or later)', | 61 'LGPL (v2.1 or later)', |
65 'LGPL (v2.1 or later) (with incorrect FSF address)', | 62 'MPL (v1.0) LGPL (v2 or later)', |
66 'MPL (v1.0) LGPL (v2 or later) (with incorrect FSF address)', | |
67 'MPL (v1.1)', | 63 'MPL (v1.1)', |
68 'MPL (v1.1) BSD-like', | 64 'MPL (v1.1) BSD-like', |
69 'MPL (v1.1) BSD-like GPL (unversioned/unknown version)', | 65 'MPL (v1.1) BSD-like GPL (unversioned/unknown version)', |
70 'MPL (v1.1) GPL (unversioned/unknown version)', | 66 'MPL (v1.1) GPL (unversioned/unknown version)', |
71 | 67 |
72 # TODO(phajdan.jr): Make licensecheck not print the comma after 1.1. | 68 # TODO(phajdan.jr): Make licensecheck not print the comma after 1.1. |
73 'MPL (v1.1,) GPL (unversioned/unknown version) LGPL (v2 or later)', | 69 'MPL (v1.1,) GPL (unversioned/unknown version) LGPL (v2 or later)', |
74 'MPL (v1.1,) GPL (unversioned/unknown version) LGPL (v2.1 or later)', | 70 'MPL (v1.1,) GPL (unversioned/unknown version) LGPL (v2.1 or later)', |
75 | 71 |
76 'MIT/X11 (BSD like)', | 72 'MIT/X11 (BSD like)', |
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
122 'gpu/KHR': [ | 118 'gpu/KHR': [ |
123 'UNKNOWN', | 119 'UNKNOWN', |
124 ], | 120 ], |
125 'gpu/gles2_conform_support/egl/native/EGL': [ | 121 'gpu/gles2_conform_support/egl/native/EGL': [ |
126 'UNKNOWN', | 122 'UNKNOWN', |
127 ], | 123 ], |
128 'native_client': [ | 124 'native_client': [ |
129 'UNKNOWN', | 125 'UNKNOWN', |
130 ], | 126 ], |
131 'native_client/toolchain': [ | 127 'native_client/toolchain': [ |
132 'BSD GPL (v2 or later) (with incorrect FSF address)', | 128 'BSD GPL (v2 or later)', |
133 'BSD (2 clause) GPL (v2 or later)', | 129 'BSD (2 clause) GPL (v2 or later)', |
134 'BSL (v1.0) GPL', | 130 'BSL (v1.0) GPL', |
135 'GPL', | 131 'GPL', |
136 'GPL (with incorrect FSF address)', | |
137 'GPL (unversioned/unknown version)', | 132 'GPL (unversioned/unknown version)', |
138 'GPL (v2)', | 133 'GPL (v2)', |
139 | 134 |
140 # TODO(phajdan.jr): Make licensecheck not print the comma after v2. | 135 # TODO(phajdan.jr): Make licensecheck not print the comma after v2. |
141 'GPL (v2,)', | 136 'GPL (v2,)', |
142 | 137 |
143 'GPL (v2 or later)', | 138 'GPL (v2 or later)', |
144 'GPL (v2 or later) (with incorrect FSF address)', | |
145 | 139 |
146 # TODO(phajdan.jr): Make licensecheck not print the comma after 3.1. | 140 # TODO(phajdan.jr): Make licensecheck not print the comma after 3.1. |
147 'GPL (v3.1,)', | 141 'GPL (v3.1,)', |
148 ], | 142 ], |
149 'net/disk_cache/hash.cc': [ | 143 'net/disk_cache/hash.cc': [ |
150 'UNKNOWN', | 144 'UNKNOWN', |
151 ], | 145 ], |
152 'net/third_party/nss/patches/applypatches.sh': [ | 146 'net/third_party/nss/patches/applypatches.sh': [ |
153 'UNKNOWN', | 147 'UNKNOWN', |
154 ], | 148 ], |
155 'net/tools/spdyshark': [ | 149 'net/tools/spdyshark': [ |
156 'GPL (v2 or later) (with incorrect FSF address)', | 150 'GPL (v2 or later)', |
157 'UNKNOWN', | 151 'UNKNOWN', |
158 ], | 152 ], |
159 'ppapi/c/documentation/check.sh': [ | 153 'ppapi/c/documentation/check.sh': [ |
160 'UNKNOWN', | 154 'UNKNOWN', |
161 ], | 155 ], |
162 'ppapi/cpp/documentation/check.sh': [ | 156 'ppapi/cpp/documentation/check.sh': [ |
163 'UNKNOWN', | 157 'UNKNOWN', |
164 ], | 158 ], |
165 'ppapi/lib/gl/include': [ | 159 'ppapi/lib/gl/include': [ |
166 'UNKNOWN', | 160 'UNKNOWN', |
167 ], | 161 ], |
168 'ppapi/native_client/tests/earth/earth_image.inc': [ | 162 'ppapi/native_client/tests/earth/earth_image.inc': [ |
169 'UNKNOWN', | 163 'UNKNOWN', |
170 ], | 164 ], |
171 'remoting/tools/gethosts.sh': [ | 165 'remoting/tools/gethosts.sh': [ |
172 'UNKNOWN', | 166 'UNKNOWN', |
173 ], | 167 ], |
174 'sdch/open-vcdiff': [ | 168 'sdch/open-vcdiff': [ |
175 'UNKNOWN', | 169 'UNKNOWN', |
176 ], | 170 ], |
177 'third_party/WebKit': [ | 171 'third_party/WebKit': [ |
178 'UNKNOWN', | 172 'UNKNOWN', |
179 ], | 173 ], |
180 'third_party/WebKit/Source/ThirdParty/ANGLE/src/compiler': [ | 174 'third_party/WebKit/Source/ThirdParty/ANGLE/src/compiler': [ |
181 'GPL', | 175 'GPL', |
182 ], | 176 ], |
183 'third_party/WebKit/Source/JavaScriptCore/tests/mozilla': [ | 177 'third_party/WebKit/Source/JavaScriptCore/tests/mozilla': [ |
| 178 'GPL', |
184 'GPL (unversioned/unknown version)', | 179 'GPL (unversioned/unknown version)', |
185 'GPL (with incorrect FSF address)', | |
186 ], | 180 ], |
187 'third_party/active_doc': [ | 181 'third_party/active_doc': [ |
188 'UNKNOWN', | 182 'UNKNOWN', |
189 ], | 183 ], |
190 'third_party/apple/ImageAndTextCell.h': [ | 184 'third_party/apple/ImageAndTextCell.h': [ |
191 'UNKNOWN', | 185 'UNKNOWN', |
192 ], | 186 ], |
193 'third_party/apple_apsl': [ | 187 'third_party/apple_apsl': [ |
194 'UNKNOWN', | 188 'UNKNOWN', |
195 ], | 189 ], |
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
249 'third_party/icu': [ | 243 'third_party/icu': [ |
250 'UNKNOWN', | 244 'UNKNOWN', |
251 ], | 245 ], |
252 'third_party/jemalloc': [ | 246 'third_party/jemalloc': [ |
253 'UNKNOWN', | 247 'UNKNOWN', |
254 ], | 248 ], |
255 'third_party/lcov': [ | 249 'third_party/lcov': [ |
256 'UNKNOWN', | 250 'UNKNOWN', |
257 ], | 251 ], |
258 'third_party/lcov/contrib/galaxy/genflat.pl': [ | 252 'third_party/lcov/contrib/galaxy/genflat.pl': [ |
259 'GPL (v2 or later) (with incorrect FSF address)', | 253 'GPL (v2 or later)', |
260 ], | 254 ], |
261 'third_party/leveldatabase/src/util/posix_logger.h': [ | 255 'third_party/leveldatabase/src/util/posix_logger.h': [ |
262 'UNKNOWN', | 256 'UNKNOWN', |
263 ], | 257 ], |
264 'third_party/libevent': [ | 258 'third_party/libevent': [ |
265 'UNKNOWN', | 259 'UNKNOWN', |
266 ], | 260 ], |
267 'third_party/libjingle/source/talk': [ | 261 'third_party/libjingle/source/talk': [ |
268 'UNKNOWN', | 262 'UNKNOWN', |
269 ], | 263 ], |
270 'third_party/libjpeg': [ | 264 'third_party/libjpeg': [ |
271 'UNKNOWN', | 265 'UNKNOWN', |
272 ], | 266 ], |
273 'third_party/libjpeg_turbo': [ | 267 'third_party/libjpeg_turbo': [ |
274 'UNKNOWN', | 268 'UNKNOWN', |
275 ], | 269 ], |
276 'third_party/libphonenumber/cpp/src': [ | 270 'third_party/libphonenumber/cpp/src': [ |
277 'UNKNOWN', | 271 'UNKNOWN', |
278 ], | 272 ], |
279 'third_party/libpng': [ | 273 'third_party/libpng': [ |
280 'UNKNOWN', | 274 'UNKNOWN', |
281 ], | 275 ], |
282 'third_party/libvpx/source': [ | 276 'third_party/libvpx/source': [ |
283 'UNKNOWN', | 277 'UNKNOWN', |
284 ], | 278 ], |
285 'third_party/libvpx/source/libvpx/examples/includes': [ | 279 'third_party/libvpx/source/libvpx/examples/includes': [ |
286 'GPL (v2 or later)', | 280 'GPL (v2 or later)', |
287 'GPL (v2 or later) (with incorrect FSF address)', | |
288 ], | 281 ], |
289 'third_party/libwebp': [ | 282 'third_party/libwebp': [ |
290 'UNKNOWN', | 283 'UNKNOWN', |
291 ], | 284 ], |
292 'third_party/libxml': [ | 285 'third_party/libxml': [ |
293 'UNKNOWN', | 286 'UNKNOWN', |
294 ], | 287 ], |
295 'third_party/libxslt': [ | 288 'third_party/libxslt': [ |
296 'UNKNOWN', | 289 'UNKNOWN', |
297 ], | 290 ], |
(...skipping 237 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
535 'to "../.." relative to the script file, which ' | 528 'to "../.." relative to the script file, which ' |
536 'will normally be the repository root.') | 529 'will normally be the repository root.') |
537 option_parser.add_option('-v', '--verbose', action='store_true', | 530 option_parser.add_option('-v', '--verbose', action='store_true', |
538 default=False, help='Print debug logging') | 531 default=False, help='Print debug logging') |
539 option_parser.add_option('--ignore-suppressions', | 532 option_parser.add_option('--ignore-suppressions', |
540 action='store_true', | 533 action='store_true', |
541 default=False, | 534 default=False, |
542 help='Ignore path-specific license whitelist.') | 535 help='Ignore path-specific license whitelist.') |
543 options, args = option_parser.parse_args() | 536 options, args = option_parser.parse_args() |
544 main(options, args) | 537 main(options, args) |
OLD | NEW |