Skip to content

Commit

Permalink
Ensuring that all lines that start with # are followed by a space
Browse files Browse the repository at this point in the history
  • Loading branch information
fishcharlie committed Jul 12, 2021
1 parent 9e21431 commit 7fc05ce
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 4 deletions.
8 changes: 4 additions & 4 deletions scripts/create-everything-list.js
Original file line number Diff line number Diff line change
Expand Up @@ -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`);

Expand Down
6 changes: 6 additions & 0 deletions scripts/lint.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
});
}));

Expand Down

0 comments on commit 7fc05ce

Please sign in to comment.