Improve license script (#5345)

This commit is contained in:
Adam Barth 2018-05-23 16:03:47 -07:00 committed by GitHub
parent e0d4c46413
commit 32443810e7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 1 deletions

View File

@ -19,6 +19,7 @@ LicenseType convertLicenseNameToType(String name) {
switch (name) {
case 'Apache':
case 'apache-license-2.0':
case 'LICENSE-APACHE-2.0.txt':
return LicenseType.apache;
case 'BSD':
case 'BSD.txt':
@ -38,6 +39,8 @@ LicenseType convertLicenseNameToType(String name) {
return LicenseType.apsl;
case 'OpenSSL':
return LicenseType.openssl;
case 'LICENSE.MPLv2':
return LicenseType.mpl;
// common file names that don't say what the type is
case 'COPYING':
case 'COPYING.txt':

View File

@ -882,7 +882,8 @@ class RepositoryDirectory extends RepositoryEntry implements LicenseSource {
}
bool shouldRecurse(fs.IoNode entry) {
return entry.name != '.git' &&
return entry.name != '.cipd' &&
entry.name != '.git' &&
entry.name != '.github' &&
entry.name != '.gitignore' &&
entry.name != 'test' &&