diff options
author | Ruben Rodriguez <ruben@fsf.org> | 2018-05-11 13:37:37 -0400 |
---|---|---|
committer | Ruben Rodriguez <ruben@fsf.org> | 2018-05-11 13:37:37 -0400 |
commit | 37559e3cd93f58f23a7a3d3ec413fcbae22656e7 (patch) | |
tree | de8b259bfc8d78e408c43352e05e2aee0da9b374 | |
parent | 12c4c697f00a703b768ab553e486be9d9f457dee (diff) |
Make legacy_license_check return the matched license name. Also improved logging.
-rw-r--r-- | legacy_license_check.js | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/legacy_license_check.js b/legacy_license_check.js index f783129..5068085 100644 --- a/legacy_license_check.js +++ b/legacy_license_check.js @@ -74,12 +74,12 @@ var search_table = function(stripped_comment){ max_i = data.licenses[license].licenseFragments.length; for (i = 0; i < max_i; i++) { if (frag[i].regex.test(stripped)) { - console.log(data.licenses[license].licenseName); - return true; + //console.log(data.licenses[license].licenseName); + return data.licenses[license].licenseName; } } } - console.log("No license found."); + console.log("No global license found."); return false; } |