未验证 提交 32443810 编写于 作者: A Adam Barth 提交者: GitHub

Improve license script (#5345)

上级 e0d4c464
...@@ -19,6 +19,7 @@ LicenseType convertLicenseNameToType(String name) { ...@@ -19,6 +19,7 @@ LicenseType convertLicenseNameToType(String name) {
switch (name) { switch (name) {
case 'Apache': case 'Apache':
case 'apache-license-2.0': case 'apache-license-2.0':
case 'LICENSE-APACHE-2.0.txt':
return LicenseType.apache; return LicenseType.apache;
case 'BSD': case 'BSD':
case 'BSD.txt': case 'BSD.txt':
...@@ -38,6 +39,8 @@ LicenseType convertLicenseNameToType(String name) { ...@@ -38,6 +39,8 @@ LicenseType convertLicenseNameToType(String name) {
return LicenseType.apsl; return LicenseType.apsl;
case 'OpenSSL': case 'OpenSSL':
return LicenseType.openssl; return LicenseType.openssl;
case 'LICENSE.MPLv2':
return LicenseType.mpl;
// common file names that don't say what the type is // common file names that don't say what the type is
case 'COPYING': case 'COPYING':
case 'COPYING.txt': case 'COPYING.txt':
......
...@@ -882,7 +882,8 @@ class RepositoryDirectory extends RepositoryEntry implements LicenseSource { ...@@ -882,7 +882,8 @@ class RepositoryDirectory extends RepositoryEntry implements LicenseSource {
} }
bool shouldRecurse(fs.IoNode entry) { bool shouldRecurse(fs.IoNode entry) {
return entry.name != '.git' && return entry.name != '.cipd' &&
entry.name != '.git' &&
entry.name != '.github' && entry.name != '.github' &&
entry.name != '.gitignore' && entry.name != '.gitignore' &&
entry.name != 'test' && entry.name != 'test' &&
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册