in lib/LicenseFinder.js [48:68]
function discoverLicense(name, licenseFiles, errors, metadata) {
for (var index in licenseFiles) {
var licenseFile = licenseFiles[index];
var type = extractLicenseName(licenseFile);
if (type != null) {
return type;
}
}
// as a last resort, hard code a license type based on the project website
if (metadata[name] != null && metadata[name].license != null) {
return metadata[name].license;
}
var scannedFiles = _(licenseFiles).filter(function(fileName) { return grunt.file.exists(fileName); });
if (scannedFiles.length > 0){
errors.push('Could not determine license type from file: \n\t' + scannedFiles.join('\n\t'));
} else {
errors.push('Could not read license file. Nothing found searching: \n\t' + licenseFiles.join('\n\t'));
}
return 'missing';
}