From e9c0fbbd2421a7f676179f102d241c81b2706f2b Mon Sep 17 00:00:00 2001 From: thalles Date: Fri, 30 Jul 2021 09:45:30 -0300 Subject: [PATCH 1/2] debug more Signed-off-by: thalles --- licence.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/licence.js b/licence.js index f1f505b..14422be 100644 --- a/licence.js +++ b/licence.js @@ -21,7 +21,8 @@ const util = require("util"); const chalk = require("chalk"); function hasCorrectCopyrightDate(copyrightFile, file, startDateLicense) { let requiredDate = '' - console.log(file.year) + console.log(file.year < new Date().getFullYear()) + console.log(startDateLicense) if (file.status === 'modified'){ if(file.year < new Date().getFullYear()) { requiredDate = `Copyright ${startDateLicense, new Date().getFullYear()}` @@ -31,6 +32,7 @@ function hasCorrectCopyrightDate(copyrightFile, file, startDateLicense) { if (file.status === 'created'){ requiredDate = `Copyright ${new Date().getFullYear()}` } + console.log(requiredDate) return copyrightFile.includes(requiredDate) } From 310557d6846f95da2484dcc9b048e2f117269516 Mon Sep 17 00:00:00 2001 From: thalles Date: Fri, 30 Jul 2021 09:47:03 -0300 Subject: [PATCH 2/2] try-again Signed-off-by: thalles --- licence.js | 1 + 1 file changed, 1 insertion(+) diff --git a/licence.js b/licence.js index 14422be..0671d23 100644 --- a/licence.js +++ b/licence.js @@ -23,6 +23,7 @@ function hasCorrectCopyrightDate(copyrightFile, file, startDateLicense) { let requiredDate = '' console.log(file.year < new Date().getFullYear()) console.log(startDateLicense) + console.log(new Date().getFullYear()) if (file.status === 'modified'){ if(file.year < new Date().getFullYear()) { requiredDate = `Copyright ${startDateLicense, new Date().getFullYear()}`