]> git.ipfire.org Git - thirdparty/blocklistproject/lists.git/commitdiff
👷 Ensure that no version/date might confuse users that read the raw text-file(s) 647/head
authorThomas Merz <git@rhoenwurz.de>
Sun, 20 Feb 2022 22:43:22 +0000 (23:43 +0100)
committerThomas Merz <git@rhoenwurz.de>
Sun, 20 Feb 2022 22:50:34 +0000 (23:50 +0100)
scripts/lint.js

index 89cb7cbd2959073c3a49ce16b8ec6a00d6aa7191..f7e9f8711b692d372c68e26eb43e094271b6a6e4 100644 (file)
@@ -22,6 +22,12 @@ const path = require("path");
                                isHeaderComplete = true;
                        }
 
+                       // Ensuring that no version/date might confuse users that read the raw text-file(s)
+                       if (line.length > 0 && !line.indexOf("Version")) {
+                               console.error(`Line ${index + 1} in ${file} must not contain a Version/Date.`);
+                               hasError = true;
+                       }
+
                        // Ensuring that all lines start with "#" or "0.0.0.0 "
                        if (line.length > 0 && !line.startsWith("#") && !line.startsWith("0.0.0.0 ")) {
                                console.error(`Line ${index + 1} in ${file} must start with "#" or "0.0.0.0 ".`);