From: Charlie Fish Date: Mon, 12 Jul 2021 00:58:36 +0000 (-0600) Subject: Ensuring that all lines that start with # are followed by a space X-Git-Tag: aggregated-20250518~446^2~4 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=7fc05ce2ad8057a718d015e5777e0d1a4335c298;p=thirdparty%2Fblocklistproject%2Flists.git Ensuring that all lines that start with # are followed by a space --- diff --git a/scripts/create-everything-list.js b/scripts/create-everything-list.js index df564a3..d5fde74 100644 --- a/scripts/create-everything-list.js +++ b/scripts/create-everything-list.js @@ -45,21 +45,21 @@ const listsToIncludeInEverythingList = [ })); let everythingListContent = -`#------------------------------------[UPDATE]-------------------------------------- +`# ------------------------------------[UPDATE]-------------------------------------- # Title: The Block List Project - Everything List # Expires: 1 day # Homepage: https://blocklist.site # Help: https://github.com/blocklistproject/lists/wiki/ # License: https://unlicense.org # Total number of network filters: -#------------------------------------[SUPPORT]------------------------------------- +# ------------------------------------[SUPPORT]------------------------------------- # You can support by: # - reporting false positives # - making a donation: https://paypal.me/blocklistproject -#-------------------------------------[INFO]--------------------------------------- +# -------------------------------------[INFO]--------------------------------------- # # Everything list -#------------------------------------[FILTERS]------------------------------------- +# ------------------------------------[FILTERS]------------------------------------- `; domains.forEach((val) => everythingListContent += `0.0.0.0 ${val}\n`); diff --git a/scripts/lint.js b/scripts/lint.js index f7d8ff6..fd61e22 100644 --- a/scripts/lint.js +++ b/scripts/lint.js @@ -24,6 +24,12 @@ const path = require("path"); hasError = true; } } + + // Ensuring that all lines that start with `#` are followed by a space + if (line.startsWith("#") && line.length > 1 && line[1] !== " ") { + console.error(`Line ${index + 1} in ${file} should have a space after #.`); + hasError = true; + } }); }));